pcp.postinst.tail (pcp-6.0.2) | : | pcp.postinst.tail (pcp-6.0.3) | ||
---|---|---|---|---|
skipping to change at line 83 | skipping to change at line 83 | |||
# of an upgrade, rather than an install ... they used to be pcp:pcp | # of an upgrade, rather than an install ... they used to be pcp:pcp | |||
chown root:root /etc/pcp/pmie | chown root:root /etc/pcp/pmie | |||
chmod 755 /etc/pcp/pmie | chmod 755 /etc/pcp/pmie | |||
chown root:root /etc/pcp/pmie/control | chown root:root /etc/pcp/pmie/control | |||
chmod 644 /etc/pcp/pmie/control | chmod 644 /etc/pcp/pmie/control | |||
chown root:root /etc/pcp/pmlogger | chown root:root /etc/pcp/pmlogger | |||
chmod 755 /etc/pcp/pmlogger | chmod 755 /etc/pcp/pmlogger | |||
chown root:root /etc/pcp/pmlogger/control | chown root:root /etc/pcp/pmlogger/control | |||
chmod 644 /etc/pcp/pmlogger/control | chmod 644 /etc/pcp/pmlogger/control | |||
do_systemd=true | do_systemd_helper=true | |||
which deb-systemd-helper >/dev/null 2>&1 || do_systemd=false | which deb-systemd-helper >/dev/null 2>&1 || do_systemd_helper=false | |||
do_systemctl=true | ||||
which systemctl >/dev/null 2>&1 || do_systemctl=false | ||||
# only need to check pmcd.service, if it is here they will all | # only need to check pmcd.service, if it is here they will all | |||
# be here | # be here | |||
[ -f /lib/systemd/system/pmcd.service ] || do_systemd=false | if [ -f /lib/systemd/system/pmcd.service ] | |||
then | ||||
: | ||||
else | ||||
do_systemd_helper=false | ||||
do_systemctl=false | ||||
fi | ||||
if $do_systemd | if $do_systemd_helper | |||
then | then | |||
deb-systemd-helper enable pmcd.service >/dev/null | deb-systemd-helper enable pmcd.service >/dev/null | |||
deb-systemd-helper enable pmlogger.service >/dev/null | deb-systemd-helper enable pmlogger.service >/dev/null | |||
deb-systemd-helper enable pmie.service >/dev/null | deb-systemd-helper enable pmie.service >/dev/null | |||
deb-systemd-helper enable pmproxy.service >/dev/null | deb-systemd-helper enable pmproxy.service >/dev/null | |||
elif which update-rc.d >/dev/null 2>&1 | elif which update-rc.d >/dev/null 2>&1 | |||
then | then | |||
update-rc.d -f pmcd remove >/dev/null | update-rc.d -f pmcd remove >/dev/null | |||
update-rc.d pmcd defaults >/dev/null | update-rc.d pmcd defaults >/dev/null | |||
update-rc.d -f pmlogger remove >/dev/null | update-rc.d -f pmlogger remove >/dev/null | |||
update-rc.d pmlogger defaults >/dev/null | update-rc.d pmlogger defaults >/dev/null | |||
update-rc.d -f pmie remove >/dev/null | update-rc.d -f pmie remove >/dev/null | |||
update-rc.d pmie defaults >/dev/null | update-rc.d pmie defaults >/dev/null | |||
update-rc.d -f pmproxy remove >/dev/null | update-rc.d -f pmproxy remove >/dev/null | |||
update-rc.d pmproxy defaults >/dev/null | update-rc.d pmproxy defaults >/dev/null | |||
fi | fi | |||
if $do_systemd | if $do_systemctl | |||
then | then | |||
systemctl daemon-reload >/dev/null | ||||
systemctl start pmcd.service >/dev/null | systemctl start pmcd.service >/dev/null | |||
systemctl start pmlogger.service >/dev/null | systemctl start pmlogger.service >/dev/null | |||
elif which invoke-rc.d >/dev/null 2>&1 | elif which invoke-rc.d >/dev/null 2>&1 | |||
then | then | |||
invoke-rc.d pmcd start | invoke-rc.d pmcd start | |||
invoke-rc.d pmlogger start | invoke-rc.d pmlogger start | |||
else | else | |||
/etc/init.d/pmcd start | /etc/init.d/pmcd start | |||
/etc/init.d/pmlogger start | /etc/init.d/pmlogger start | |||
fi | fi | |||
End of changes. 5 change blocks. | ||||
5 lines changed or deleted | 14 lines changed or added |