dkl-user-services: migrate to supervise-daemon

This commit is contained in:
Mikaël Cluseau 2023-11-27 15:35:46 +01:00
parent 6099dd399d
commit 354bdce5ab
2 changed files with 5 additions and 22 deletions

View File

@ -1,5 +1,5 @@
# ------------------------------------------------------------------------
from mcluseau/golang-builder:1.21.3 as build
from mcluseau/golang-builder:1.21.4 as build
# ------------------------------------------------------------------------
from alpine:3.18.4

View File

@ -2,29 +2,12 @@
description="Direktil user services."
pidfile=/run/direktil/services.pid
supervisor=supervise-daemon
command="/sbin/dkl init services"
pidfile=/run/dkl-init-services.pid
depend()
{
need dkl-default
}
start()
{
mkdir -p $(dirname $pidfile)
einfo "Starting Direktil services manager"
start-stop-daemon --start \
--pidfile $pidfile \
--background \
--exec "/sbin/dkl" \
-- init services
eend $? "Failed to start Direktil services manager"
}
stop()
{
einfo "Stopping Direktil services manager"
start-stop-daemon --stop --pidfile $pidfile
eend $? "Failed to stop Direktil services manager"
}