pvc/debian/pvc-daemon-node.postinst
Joshua M. Boniface e63d8e59e9 Install sample configs to /usr/share/pvc instead
Also clean up the old versions in the postinst as they are obsolete and
not needed going forward. These only ever served as reference for a
manual installation which itself is long-obsoleted, and thus can be put
somewhere less "important".
2023-10-26 13:00:54 -04:00

20 lines
739 B
Bash

#!/bin/sh
# Reload systemd's view of the units
systemctl daemon-reload
# Enable the service and target
systemctl enable /lib/systemd/system/pvcnoded.service
systemctl enable /lib/systemd/system/pvcautoready.service
systemctl enable /lib/systemd/system/pvc.target
# Inform administrator of the service restart/startup not occurring automatically
if systemctl is-active --quiet pvcnoded.service; then
echo "NOTE: The PVC node daemon (pvcnoded.service) has not been restarted; this is up to the administrator."
else
echo "NOTE: The PVC node daemon (pvcnoded.service) has not been started; create a config file at /etc/pvc/pvcnoded.yaml then start it."
fi
# Clean up any old sample configs
rm /etc/pvc/pvcnoded.sample.yaml || true