summaryrefslogtreecommitdiffstats
path: root/src/lib/service/user/goetia-shutdown/run
blob: e13d01675989ae850e1c0251e57578d9ba6b633e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!@shebangdir@/execlineb -P

# ISC license.

fdmove -c 2 1

multisubstitute {
	importas -Si USER
	importas -Si USERTREE
}

if -x0 { eltest -d @tmpfsdir@/@usrrundir@/${USER}/${USERTREE} }

foreground {
	foreground { echo "\nshutdown\n" }
	s6-rc -l @tmpfsdir@/@usrrundir@/${USER}/${USERTREE}/s6-rc -v2 -b -da -t@timeout@ change
}

foreground { s6-svc -h @tmpfsdir@/@usrrundir@/${USER}/${USERTREE}/service/s6-svscan-log }
foreground { s6-svscanctl -t @tmpfsdir@/@usrrundir@/${USER}/${USERTREE}/service }