Skip to content

Commit 5a5109c

Browse files
committed
improve runit service frontend file.
1 parent 87a5543 commit 5a5109c

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

srcpkgs/boot-66serv/files/runit

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,24 @@
66
@options = ( log )
77

88
[start]
9-
@execute = ( /etc/runit/2 )
9+
@build = custom
10+
@shebang = ( "/bin/sh" )
11+
@execute = (
12+
PATH=/usr/bin:/usr/sbin
13+
14+
runlevel=66
15+
16+
runsvchdir "${runlevel}"
17+
mkdir -p /run/runit/runsvdir
18+
ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current
19+
20+
exec env - PATH=$PATH \
21+
runsvdir -P /run/runit/runsvdir/current 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
22+
23+
)
1024

1125
[stop]
12-
@execute = ( exec-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
26+
@execute = ( execl-cmdline -s { sv force-stop /var/service/*; sv exit /var/service/* } )
1327

1428
[logger]
1529
@backup = 3

srcpkgs/boot-66serv/template

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ conf_files="/etc/66/rc.local"
1919
distfiles="https://framagit.org/Obarun/${pkgname}/-/archive/v${version}/${pkgname}-v${version}.tar.gz"
2020
checksum=34eac7f84dd9cafda78a7b5a21eed484e9d6b52e8fba0ade6dbb5f1567def84d
2121

22+
make_dirs="/etc/runit/runsvdir/66 0750 root root"
23+
2224
post_install() {
2325
vinstall ${FILESDIR}/switch-initutils 644 etc/runit/core-services 99-switch-initutils.sh
2426
vbin ${FILESDIR}/66

0 commit comments

Comments
 (0)