Add provisioner to Debian packages

This commit is contained in:
2019-12-09 10:40:27 -05:00
parent 19a75ea92e
commit 57e8fba602
4 changed files with 34 additions and 2 deletions

15
debian/pvc-client-provisioner.postinst vendored Normal file
View File

@ -0,0 +1,15 @@
#!/bin/sh
# Install client binary to /usr/bin via symlink
ln -s /usr/share/pvc/provisioner.py /usr/bin/pvc-provisioner
# Reload systemd's view of the units
systemctl daemon-reload
# Restart the daemon (or warn on first install)
if systemctl is-active --quiet pvc-provisioner.service; then
systemctl restart pvc-provisioner.service
systemctl restart pvc-provisioner-worker.service
else
echo "NOTE: The PVC client API daemon (pvc-provisioner.service) has not been started; create a config file at /etc/pvc/pvc-provisioner.yaml then start it."
fi