From: Frank Brehm Date: Wed, 18 May 2016 20:44:17 +0000 (+0200) Subject: committing changes in /etc after emerge run X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=1211ead8f7dd72d7d19344f92dba6fc4f82a5890;p=config%2Fbruni%2Fetc.git committing changes in /etc after emerge run Package changes: +dev-python/twisted-core-13.2.0 --- diff --git a/conf.d/twistd b/conf.d/twistd new file mode 100644 index 00000000..53788cd0 --- /dev/null +++ b/conf.d/twistd @@ -0,0 +1,7 @@ + +# These are passed to twistd. +# TWISTD_OPTS="--no_save --logfile=/var/log/twistd -y /etc/twistd.tac" +# TWISTD_OPTS="--no_save --logfile=/var/log/twistd -f /etc/twistd.tap" + +# Make any additions to PYTHONPATH the twistd needs here. +# PYTHONPATH="/path/to/extra/python/modules" diff --git a/init.d/twistd b/init.d/twistd new file mode 100755 index 00000000..e7b29f1a --- /dev/null +++ b/init.d/twistd @@ -0,0 +1,25 @@ +#!/sbin/runscript + +depend() { + need net +} + +start() { + if [ -z "${TWISTD_OPTS}" ]; then + eerror "TWISTD_OPTS is not set!" + eerror "You need to configure twistd in /etc/conf.d/twistd." + return 1 + fi + export PYTHONPATH + ebegin "Starting twistd" + start-stop-daemon --start --quiet --pidfile /var/run/twistd.pid \ + --exec /usr/bin/twistd -- --pidfile /var/run/twistd.pid \ + ${TWISTD_OPTS} + eend $? "Failed to start twistd" +} + +stop() { + ebegin "Stopping twistd" + start-stop-daemon --stop --quiet --pidfile /var/run/twistd.pid + eend $? "Failed to stop twistd" +}