diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-04-28 20:21:43 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-04-28 20:21:43 +0100 |
commit | 40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch) | |
tree | 758c221bad35c9288d0bd6df9c7dfc226728e52c /sys-cluster/gmqtt/files/initd | |
parent | 8d5dbd847cbc704a6a06405856e94b461011afe3 (diff) |
gentoo resync : 28.04.2021
Diffstat (limited to 'sys-cluster/gmqtt/files/initd')
-rw-r--r-- | sys-cluster/gmqtt/files/initd | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sys-cluster/gmqtt/files/initd b/sys-cluster/gmqtt/files/initd new file mode 100644 index 000000000000..ec579abc501d --- /dev/null +++ b/sys-cluster/gmqtt/files/initd @@ -0,0 +1,26 @@ +#!/sbin/openrc-run + +description="Gmqtt Broker Service" +pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"} +command="/usr/bin/gmqttd" +command_user="${command_user:-"nobody:nobody"}" +command_args="${GMQTTD_OPTS:-"-c /etc/gmqtt/gmqttd.yml start"}" +command_background="true" +logfile=/var/log/gmqtt/${RC_SVCNAME}.log +start_stop_daemon_args="--user ${command_user%:*} --group ${command_user#*:} + --stdout ${logfile} --stderr ${logfile}" + +: "${supervisor:=supervise-daemon}" +: "${respawn_delay:=5}" +: "${respawn_max:=10}" +: "${respawn_period:=60}" + +depend() { + need net +} + +start() { + checkpath --directory --mode 755 --owner root "${pidfile%/*}" + checkpath --directory --mode 755 --owner "${command_user}" "${logfile%/*}" + default_start +} |