mirror of
https://github.com/webmin/webmin.git
synced 2026-06-09 22:40:23 +01:00
ⓘ Rename webmin-gentoo-init to webmin-openrc-init and update setup/distribution references to use the generic OpenRC template name.
45 lines
716 B
Plaintext
Executable File
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
|
|
|
|
}
|