summaryrefslogtreecommitdiff
path: root/app-misc/conmux/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-misc/conmux/files
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-misc/conmux/files')
-rw-r--r--app-misc/conmux/files/conmux-registry.confd4
-rw-r--r--app-misc/conmux/files/conmux-registry.initd31
-rw-r--r--app-misc/conmux/files/conmux.confd14
-rw-r--r--app-misc/conmux/files/conmux.initd39
4 files changed, 88 insertions, 0 deletions
diff --git a/app-misc/conmux/files/conmux-registry.confd b/app-misc/conmux/files/conmux-registry.confd
new file mode 100644
index 000000000000..ac7bd8c20d5e
--- /dev/null
+++ b/app-misc/conmux/files/conmux-registry.confd
@@ -0,0 +1,4 @@
+# Port for Registry listener
+CONMAX_REGISTRY_PORT="63000"
+# Log file
+CONMAX_REGISTRY_LOG="/var/log/conmux-registry.log"
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 $?
+}
diff --git a/app-misc/conmux/files/conmux.confd b/app-misc/conmux/files/conmux.confd
new file mode 100644
index 000000000000..7f983c9ac409
--- /dev/null
+++ b/app-misc/conmux/files/conmux.confd
@@ -0,0 +1,14 @@
+# Configuration file
+# It should point to a valid device configuration file
+# eg CONMUX_CONFIG="/etc/conmux/deviceA.cf
+#
+# See https://github.com/autotest/autotest/wiki/Conmux-Howto
+# and https://github.com/autotest/autotest/wiki/Conmux-OriginalDocumentation
+# for examples
+#
+# Default value is empty so the init script will fail and force you
+# to create a new config
+#
+CONMUX_CONFIG=""
+# Log file
+CONMUX_LOG="/var/log/conmux.log"
diff --git a/app-misc/conmux/files/conmux.initd b/app-misc/conmux/files/conmux.initd
new file mode 100644
index 000000000000..b74fd28b969c
--- /dev/null
+++ b/app-misc/conmux/files/conmux.initd
@@ -0,0 +1,39 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use net
+ need conmux-registry
+}
+
+checkconfig() {
+ if [ ! -f ${CONMUX_CONFIG} ]; then
+ eerror ""
+ eerror "No conmux configuration file was found!"
+ eerror "Please read the conmux README file."
+ eerror ""
+ return 1
+ fi
+ # Sane default
+ if [ -z ${CONMUX_LOG} ]; then
+ CONMUX_LOG="/var/log/conmux.log"
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || exit 1
+ # Make sure conmux finds everything
+ export PATH="${PATH}:/usr/share/conmux/drivers:/usr/share/conmux/helpers"
+ ebegin "Starting conmux daemon"
+ start-stop-daemon -m -b --start -1 ${CONMUX_LOG} \
+ -2 ${CONMUX_LOG} -p /run/${SVCNAME}.pid \
+ --exec /usr/sbin/conmux -- ${CONMUX_CONFIG}
+}
+
+stop() {
+ ebegin "Stopping conmux daemon"
+ start-stop-daemon --stop --pidfile /run/${SVCNAME}.pid
+ eend $?
+}