linuxbox
In Zeiten, wo systemd in allen Major Versionen dominant ist, ist es für grommunio einfach nicht sinnvoll, sysvinit mit zu shippen, da dies auch maintained werden müsste. Debian, Ubuntu, SUSE, RH, alle supporteten distri nutzen systemd. Sogar Gentoo will per default systemd.
Jedoch nicht verzagen, ein init script ist keine Magie - Beispiel:
[Unit]
Description=Gromox HTTP service
Documentation=man:http(8gx)
After=mariadb.service mysql.service
[Service]
Type=simple
Restart=on-failure
ExecStart=/usr/libexec/gromox/http
ExecReload=/bin/kill -HUP $MAINPID
ProtectSystem=yes
[Install]
WantedBy=multi-user.target
wäre z.B. so abbildbar:
#!/bin/sh
#
# /etc/init.d/gromox-http
# Subsystem file for "Gromox HTTP Service"
#
# chkconfig: 2345 90 60
# description: Gromox HTTP service
# processname: gromox-http
# pidfile: /var/run/gromox-http.pid
### BEGIN INIT INFO
# Provides: gromox-http
# Required-Start: $local_fs $network $named $time $syslog mariadb mysql
# Required-Stop: $local_fs $network $named $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start Gromox HTTP Service at boot time
# Description: Enable service provided by Gromox HTTP.
### END INIT INFO
# Source function library.
. /etc/init.d/functions
start() {
echo -n "Starting Gromox HTTP service: "
/usr/libexec/gromox/http &
echo $! > /var/run/gromox-http.pid
echo
[ $? -eq 0 ] && touch /var/lock/subsys/gromox-http
return $?
}
stop() {
echo -n "Shutting down Gromox HTTP service: "
killproc -p /var/run/gromox-http.pid /usr/libexec/gromox/http
echo
[ $? -eq 0 ] && rm -f /var/lock/subsys/gromox-http /var/run/gromox-http.pid
return $?
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status -p /var/run/gromox-http.pid /usr/libexec/gromox/http
;;
restart)
stop
start
;;
reload)
echo -n "Reloading Gromox HTTP service: "
kill -HUP `cat /var/run/gromox-http.pid`
echo
;;
*)
echo "Usage: $0 {start|stop|status|restart|reload}"
exit 2
esac
exit $?
Also: einfach auf Basis von https://github.com/grommunio/gromox/tree/master/system die tps files zu init.d umbauen und schon wird der Eigenbedarf erfüllt. Wenn sich jemand findet, der diese up-to-date halten will können wir diese als contrib für die community aufnehmen.