From fdc357b07ec6718830191765f0b85a9aa996fa87 Mon Sep 17 00:00:00 2001 From: Carneiro Date: Mon, 9 Sep 2024 21:33:44 -0300 Subject: [PATCH] Update DEBIAN/postinst --- DEBIAN/postinst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/DEBIAN/postinst b/DEBIAN/postinst index 1603ed4..ba258dc 100755 --- a/DEBIAN/postinst +++ b/DEBIAN/postinst @@ -1,7 +1,10 @@ #!/bin/sh -set +e +set -e -# Script executado pós instalação interface=$(ip -o -4 route show to default | awk '{print $5}') -systemctl enable --now wol@$interface.service \ No newline at end of file + +# Install and start the systemd service +if ! systemctl enable --now wol@$interface.service; then + echo "Warning: Failed to start your-service.service" >&2 +fi \ No newline at end of file