Merge branch 'pcp-pidstat-fixes' of https://github.com/sitaramshelke/pcp into sitaram...
[pcp.git] / debian / pcp.preinst.head.in
blobd15e6e9a6d0061c699b9b024376b31beaf4c9630
1 #!/bin/sh -e
2 #DEBHELPER#
4 # The goal here is to collect PCP configuration files from places
5 # they may have been stashed away in previous versions
8 # The new place ... this should match the setting in /etc/pcp.conf
10 PCP_SYSCONF_DIR=@pcp_sysconf_dir@
11 # and same here ...
13 PCP_LOG_DIR=@pcp_log_dir@
14 [ -d "$PCP_LOG_DIR" ] || mkdir "$PCP_LOG_DIR"
16 PCP_ETC_DIR=@pcp_etc_dir@
17 for crontab in pmlogger pmie
19 test -f "$PCP_ETC_DIR/cron.d/$crontab" || continue
20 mv -f "$PCP_ETC_DIR/cron.d/$crontab" "$PCP_ETC_DIR/cron.d/pcp-$crontab"
21 done