2018-10-14 02:01:35 -04:00
#!/bin/sh
2019-07-06 01:48:45 -04:00
# Reload systemd's view of the units
systemctl daemon-reload
2019-05-23 22:38:45 -04:00
# Enable the service and target
2018-10-14 02:01:35 -04:00
systemctl enable /lib/systemd/system/pvcd.service
2019-05-23 22:38:45 -04:00
systemctl enable /lib/systemd/system/pvcd.target
2018-10-14 02:01:35 -04:00
2019-05-23 22:38:45 -04:00
# Inform administrator of the autoflush daemon if it is not enabled
if ! systemctl is-active --quiet pvc-flush.service; then
2019-05-23 22:49:00 -04:00
echo "NOTE: The PVC autoflush daemon (pvc-flush.service) is not enabled by default; enable it to perform automatic flush/unflush actions on host shutdown/startup."
2019-05-23 22:38:45 -04:00
fi
# Inform administrator of the service restart/startup not occurring automatically
2018-10-14 02:01:35 -04:00
if systemctl is-active --quiet pvcd.service; then
2019-05-23 22:49:00 -04:00
echo "NOTE: The PVC node daemon (pvcd.service) has not been restarted; this is up to the administrator."
2018-10-14 02:01:35 -04:00
else
2019-05-23 22:49:00 -04:00
echo "NOTE: The PVC node daemon (pvcd.service) has not been started; create a config file at /etc/pvc/pvcd.yaml then start it."
2018-10-14 02:01:35 -04:00
fi