diff options
author | Rosen Penev <rosenp@gmail.com> | 2020-03-05 18:07:40 -0800 |
---|---|---|
committer | Rosen Penev <rosenp@gmail.com> | 2020-03-09 14:10:43 -0700 |
commit | d385bbe7526c8462282ce7232a0fb7e3f8ae4552 (patch) | |
tree | d8803fda9fb26f517aeacdc93fedd43bcc8da9d2 /utils/acpid/files | |
parent | 4327b2b08375c9fc06075f767d28f92c5edbb00b (diff) |
acpid: convert to procd
acpid has no option -x, so removed.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'utils/acpid/files')
-rw-r--r-- | utils/acpid/files/acpid.init | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/utils/acpid/files/acpid.init b/utils/acpid/files/acpid.init index 3365aa022..c860327ca 100644 --- a/utils/acpid/files/acpid.init +++ b/utils/acpid/files/acpid.init @@ -4,22 +4,16 @@ START=99 STOP=80 -ACPID_BIN="/usr/sbin/acpid" -ACPID_PID="/var/run/acpid.pid" +USE_PROCD=1 -start() { - [ -x "$ACPID_BIN" ] || return 1 - start-stop-daemon -S -x $ACPID_BIN -p $ACPID_PID +start_service() { + procd_open_instance + procd_set_param command "/usr/sbin/acpid" + procd_append_param command -f + procd_append_param command -S + procd_set_param pidfile "/var/run/acpid.pid" } -boot() { - # Do nothing on boot - [ -x "$ACPID_BIN" ] || return 1 - start-stop-daemon -S -x $ACPID_BIN -p $ACPID_PID - exit 0 -} - -stop() { - service_kill ${ACPID_BIN##*/} $ACPID_PID - rm -f $ACPID_PID +reload_service()\ { + procd_send_signal "acpid" } |