From 9eeed64a922ee15886393520cbf43ec35e8fc1e0 Mon Sep 17 00:00:00 2001 From: Gabriel Carneiro Date: Mon, 9 Sep 2024 20:41:11 -0300 Subject: [PATCH] update unit and add postinst script --- DEBIAN/postinst | 2 ++ lib/systemd/system/{wakeonlan.service => wol@.service} | 0 2 files changed, 2 insertions(+) rename lib/systemd/system/{wakeonlan.service => wol@.service} (100%) diff --git a/DEBIAN/postinst b/DEBIAN/postinst index 8a532bb..582f583 100755 --- a/DEBIAN/postinst +++ b/DEBIAN/postinst @@ -1,3 +1,5 @@ #!/bin/sh # Script executado pós instalação +interface=$(ip -o -4 route show to default | awk '{print $5}') +systemctl enable --now wol@$interface.service diff --git a/lib/systemd/system/wakeonlan.service b/lib/systemd/system/wol@.service similarity index 100% rename from lib/systemd/system/wakeonlan.service rename to lib/systemd/system/wol@.service