summaryrefslogblamecommitdiff
path: root/system/utmps/utmps.initd
blob: c6f884a527ee73624c198ff7fddd761df5a8a267 (plain) (tree)





























                                                                       
#!/sbin/openrc-run
# Copyright 2022 Adélie Linux

description="boot script for the utmps wtmp and btmp services"

depend()
{
	need localmount
	after bootmisc
	before networking
}

stop()
{
	ebegin "Stopping the utmps wtmp and btmp services"
	touch /run/service/wtmpd/down /run/service/btmpd/down
	s6-svc -d /run/service/btmpd
	s6-svc -d /run/service/wtmpd
	eend $?
}

start()
{
	ebegin "Starting the utmps wtmp and btmp services"
	rm -f /run/service/wtmpd/down /run/service/btmpd/down
	s6-svlisten -U " /run/service/wtmpd" " /run/service/btmpd" "" \
		foreground " s6-svc" " -u" " /run/service/wtmpd" "" \
		s6-svc -u /run/service/btmpd
	eend $?
}