From e63d8e59e9492338274da75456cc8f41d8d66444 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Thu, 26 Oct 2023 12:56:20 -0400 Subject: [PATCH] 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". --- debian/pvc-daemon-api.install | 2 +- debian/pvc-daemon-api.postinst | 3 +++ debian/pvc-daemon-node.install | 2 +- debian/pvc-daemon-node.postinst | 3 +++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/pvc-daemon-api.install b/debian/pvc-daemon-api.install index 1a8be6f0..234c9806 100644 --- a/debian/pvc-daemon-api.install +++ b/debian/pvc-daemon-api.install @@ -1,7 +1,7 @@ api-daemon/pvcapid.py usr/share/pvc api-daemon/pvcapid-manage*.py usr/share/pvc api-daemon/pvc-api-db-upgrade usr/share/pvc -api-daemon/pvcapid.sample.yaml etc/pvc +api-daemon/pvcapid.sample.yaml usr/share/pvc api-daemon/pvcapid usr/share/pvc api-daemon/pvcapid.service lib/systemd/system api-daemon/pvcapid-worker.service lib/systemd/system diff --git a/debian/pvc-daemon-api.postinst b/debian/pvc-daemon-api.postinst index 6da571a6..9fc3bc07 100644 --- a/debian/pvc-daemon-api.postinst +++ b/debian/pvc-daemon-api.postinst @@ -18,3 +18,6 @@ fi if [ ! -f /etc/pvc/pvcapid.yaml ]; then echo "NOTE: The PVC client API daemon (pvcapid.service) and the PVC provisioner worker daemon (pvcapid-worker.service) have not been started; create a config file at /etc/pvc/pvcapid.yaml, then run the database configuration (/usr/share/pvc/pvc-api-db-upgrade) and start them manually." fi + +# Clean up any old sample configs +rm /etc/pvc/pvcapid.sample.yaml || true diff --git a/debian/pvc-daemon-node.install b/debian/pvc-daemon-node.install index f428e6c1..62bf7391 100644 --- a/debian/pvc-daemon-node.install +++ b/debian/pvc-daemon-node.install @@ -1,5 +1,5 @@ node-daemon/pvcnoded.py usr/share/pvc -node-daemon/pvcnoded.sample.yaml etc/pvc +node-daemon/pvcnoded.sample.yaml usr/share/pvc node-daemon/pvcnoded usr/share/pvc node-daemon/pvcnoded.service lib/systemd/system node-daemon/pvc.target lib/systemd/system diff --git a/debian/pvc-daemon-node.postinst b/debian/pvc-daemon-node.postinst index c8c7a963..a5d4436b 100644 --- a/debian/pvc-daemon-node.postinst +++ b/debian/pvc-daemon-node.postinst @@ -14,3 +14,6 @@ if systemctl is-active --quiet pvcnoded.service; then 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