diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /app-misc/conmux/files/conmux-registry.initd |
reinit the tree, so we can have metadata
Diffstat (limited to 'app-misc/conmux/files/conmux-registry.initd')
-rw-r--r-- | app-misc/conmux/files/conmux-registry.initd | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/app-misc/conmux/files/conmux-registry.initd b/app-misc/conmux/files/conmux-registry.initd new file mode 100644 index 000000000000..3e3179a224ab --- /dev/null +++ b/app-misc/conmux/files/conmux-registry.initd @@ -0,0 +1,31 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +checkconfig() { + # Set sane defaults + if [ -z ${CONMUX_REGISTRY_PORT} ]; then + CONMUX_REGISTRY_PORT="63000" + fi + if [ -z ${CONMUX_REGISTRY_LOG} ]; then + CONMUX_REGISTRY_LOG="/var/log/conmux-registry.log" + fi +} + +start() { + checkconfig + # Make sure conmux finds everything + export PATH="${PATH}:/usr/share/conmux/drivers:/usr/share/conmux/helpers" + ebegin "Starting conmux registry daemon" + [ -e ${CONMUX_REGISTRY_LOG} ] && rm ${CONMUX_REGISTRY_LOG} + touch ${CONMUX_REGISTRY_LOG} + start-stop-daemon -b -m --start -p /run/conmux-registry.pid \ + --exec /usr/sbin/conmux-registry -- ${CONMUX_REGISTRY_PORT} \ + ${CONMUX_REGISTRY_LOG} +} + +stop() { + ebegin "Stopping conmux registry daemon" + start-stop-daemon --stop --pidfile /run/conmux-registry.pid + eend $? +} |