From 453335ded701ab060935c9ad29dec592dc47b2b0 Mon Sep 17 00:00:00 2001 From: frank Date: Mon, 16 Jan 2012 20:45:17 +0100 Subject: [PATCH] committing changes in /etc after emerge run Package changes: +dev-python/twisted-11.0.0 --- .etckeeper | 2 ++ conf.d/twistd | 7 +++++++ init.d/twistd | 25 +++++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 conf.d/twistd create mode 100755 init.d/twistd diff --git a/.etckeeper b/.etckeeper index a83c38fb..e22e967e 100755 --- a/.etckeeper +++ b/.etckeeper @@ -205,6 +205,7 @@ maybe chmod 0644 './conf.d/sshd' maybe chmod 0644 './conf.d/staticroute' maybe chmod 0644 './conf.d/svnserve' maybe chmod 0644 './conf.d/syslog-ng' +maybe chmod 0644 './conf.d/twistd' maybe chmod 0644 './conf.d/udev' maybe chmod 0644 './conf.d/urandom' maybe chmod 0644 './conf.d/wpa_supplicant' @@ -695,6 +696,7 @@ maybe chmod 0755 './init.d/sysfs' maybe chmod 0755 './init.d/syslog-ng' maybe chmod 0755 './init.d/sysstat' maybe chmod 0755 './init.d/termencoding' +maybe chmod 0755 './init.d/twistd' maybe chmod 0755 './init.d/udev' maybe chmod 0755 './init.d/udev-dev-tarball' maybe chmod 0755 './init.d/udev-mount' 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..5d4d4e79 --- /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" +} -- 2.39.5