From 76ba30043676321fb01e0e7e0e87d94cc993fbd4 Mon Sep 17 00:00:00 2001 From: Nikita Tokarchuk Date: Sat, 18 May 2024 07:08:52 +0200 Subject: [PATCH] add systemd unit args --- rpm/golang-code-tokarch-mainnika-acpi-wakeup-fixxer.spec | 4 ++++ systemd/acpi-wakeup-fixxer | 1 + systemd/acpi-wakeup-fixxer.service | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 systemd/acpi-wakeup-fixxer diff --git a/rpm/golang-code-tokarch-mainnika-acpi-wakeup-fixxer.spec b/rpm/golang-code-tokarch-mainnika-acpi-wakeup-fixxer.spec index a6a287c..d587044 100644 --- a/rpm/golang-code-tokarch-mainnika-acpi-wakeup-fixxer.spec +++ b/rpm/golang-code-tokarch-mainnika-acpi-wakeup-fixxer.spec @@ -46,6 +46,9 @@ install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ install -m 0755 -vd %{buildroot}%{_unitdir} install -m 0644 -vp systemd/acpi-wakeup-fixxer.service %{buildroot}%{_unitdir}/ +install -m 0755 -vd %{buildroot}%{_sysconfdir}/default +install -m 0644 -vp systemd/acpi-wakeup-fixxer %{buildroot}%{_sysconfdir}/default/ + %if %{with check} %check %gocheck @@ -56,6 +59,7 @@ install -m 0644 -vp systemd/acpi-wakeup-fixxer.service %{buildroot}%{_unitdir}/ %doc README.md %{_bindir}/* %{_unitdir}/acpi-wakeup-fixxer.service +%config(noreplace) %{_sysconfdir}/default/acpi-wakeup-fixxer %gopkgfiles diff --git a/systemd/acpi-wakeup-fixxer b/systemd/acpi-wakeup-fixxer new file mode 100644 index 0000000..80f2511 --- /dev/null +++ b/systemd/acpi-wakeup-fixxer @@ -0,0 +1 @@ +ACPI_WAKEUP_FIXXER_ARGS="" \ No newline at end of file diff --git a/systemd/acpi-wakeup-fixxer.service b/systemd/acpi-wakeup-fixxer.service index ea5702b..0b20d0f 100644 --- a/systemd/acpi-wakeup-fixxer.service +++ b/systemd/acpi-wakeup-fixxer.service @@ -6,10 +6,11 @@ Before=sysinit.target shutdown.target ConditionPathExists=|/proc/acpi/wakeup [Service] -ExecStart=/usr/local/bin/acpi-wakeup-fixxer +ExecStart=/usr/local/bin/acpi-wakeup-fixxer $ACPI_WAKEUP_FIXXER_ARGS Type=oneshot TimeoutSec=0 RemainAfterExit=yes +EnvironmentFile=-/etc/default/acpi-wakeup-fixxer [Install] WantedBy=sysinit.target