Files
webmin/webmin-openrc-init
Ilia Ross 3215c0d0a3 Fix to rename OpenRC init template
ⓘ Rename webmin-gentoo-init to webmin-openrc-init and update setup/distribution references to use the generic OpenRC template name.
2026-06-08 12:24:28 +02:00

45 lines
716 B
Plaintext
Executable File

#!/sbin/openrc-run
# Copyright 2024 webmin & mckaygerhard
# Distributed under the terms of the GNU General Public License, v2 or later
name="webmin"
conf_file="WEBMIN_CONFIG/miniserv.conf"
depend() {
need logger localmount
use net
after bootmisc
}
start() {
WEBMIN_CONFIG/start
eend $?
}
stop() {
WEBMIN_CONFIG/stop
eend $?
}
status() {
pidfile=`grep "^pidfile=" "${conf_file}" | sed -e 's/pidfile=//g'`
if [ -s $pidfile ]; then
pid=`cat $pidfile`
kill -0 $pid >/dev/null 2>&1
if [ "$?" = "0" ]; then
einfo "webmin (pid $pid) is running"
return 0
else
einfo "webmin is stopped"
return 0
fi
else
einfo "webmin is stopped"
return 0
fi
}