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'
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'
--- /dev/null
+
+# 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"
--- /dev/null
+#!/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"
+}