2019-07-05 22:22:28 -04:00
#!/bin/sh
# Install client binary to /usr/bin via symlink
2020-02-08 19:16:19 -05:00
ln -s /usr/share/pvc/api.py /usr/bin/pvcapid
2019-07-06 01:48:45 -04:00
# Reload systemd's view of the units
systemctl daemon-reload
2019-12-14 14:12:55 -05:00
# Restart the main daemon (or warn on first install)
2020-02-08 19:16:19 -05:00
if systemctl is-active --quiet pvcapid.service; then
systemctl restart pvcapid.service
2019-07-06 01:48:45 -04:00
else
2020-02-08 19:16:19 -05:00
echo "NOTE: The PVC client API daemon (pvcapid.service) has not been started; create a config file at /etc/pvc/pvcapid.yaml then start it."
2019-07-06 01:48:45 -04:00
fi
2019-12-14 14:12:55 -05:00
# Restart the worker daemon (or warn on first install)
2020-02-08 19:16:19 -05:00
if systemctl is-active --quiet pvcapid-worker.service; then
systemctl restart pvcapid-worker.service
2019-12-14 14:12:55 -05:00
else
2020-02-08 19:16:19 -05:00
echo "NOTE: The PVC provisioner worker daemon (pvcapid-worker.service) has not been started; create a config file at /etc/pvc/pvcapid.yaml then start it."
2019-12-14 14:12:55 -05:00
fi