From c2d0aad973eba630ccfaef4b8b6a06f344d653ec Mon Sep 17 00:00:00 2001 From: TC Johnson Date: Mon, 17 Jul 2023 20:55:45 -0500 Subject: [PATCH] service restart if running, instructs to start if not --- package/rpm/veilid-server/veilid-server.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/rpm/veilid-server/veilid-server.spec b/package/rpm/veilid-server/veilid-server.spec index 2790f042..a9b51b92 100644 --- a/package/rpm/veilid-server/veilid-server.spec +++ b/package/rpm/veilid-server/veilid-server.spec @@ -47,6 +47,13 @@ echo "Congratulations! To start your Veilid node and set it to start at boot, ru %postun systemctl daemon-reload +%posttrans +if systemctl is-active --quiet veilid-server.service; then + systemctl restart veilid-server.service +else + echo "Veilid-Server is installed but not currently running. Configure the service to start immediatly and at boot time by running the following command: systemctl enable --now veilid-server.service" +fi + %changelog * Sun Jul 2 2023 TC - experimental RPM building