summaryrefslogtreecommitdiff
path: root/debian/pcp.preinst.head.in
blob: d15e6e9a6d0061c699b9b024376b31beaf4c9630 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh -e
#DEBHELPER#
#
# The goal here is to collect PCP configuration files from places
# they may have been stashed away in previous versions
#

# The new place ... this should match the setting in /etc/pcp.conf
#
PCP_SYSCONF_DIR=@pcp_sysconf_dir@
# and same here ...
#
PCP_LOG_DIR=@pcp_log_dir@
[ -d "$PCP_LOG_DIR" ] || mkdir "$PCP_LOG_DIR"

PCP_ETC_DIR=@pcp_etc_dir@
for crontab in pmlogger pmie
do
    test -f "$PCP_ETC_DIR/cron.d/$crontab" || continue
    mv -f "$PCP_ETC_DIR/cron.d/$crontab" "$PCP_ETC_DIR/cron.d/pcp-$crontab"
done