--- a/docs/etc_defaults/fixbot-logwatch Thu Feb 04 19:46:31 2010 +0200
+++ b/docs/etc_defaults/fixbot-logwatch Thu Feb 04 19:54:49 2010 +0200
@@ -15,8 +15,8 @@
--rundir=$RUN_DIR \
--logfile=$LOG_FILE "
-# fixbot options
-FIXBOT_ARGS=" \
+# twistd plugin options
+PLUGIN_ARGS=" \
--api-port=34889 "
# plugins/modules are loaded from RUN_DIR
--- a/docs/etc_defaults/fixbot-nexus Thu Feb 04 19:46:31 2010 +0200
+++ b/docs/etc_defaults/fixbot-nexus Thu Feb 04 19:54:49 2010 +0200
@@ -15,8 +15,8 @@
--rundir=$RUN_DIR \
--logfile=$LOG_FILE "
-# fixbot options
-FIXBOT_ARGS=" \
+# twistd plugin options
+PLUGIN_ARGS=" \
--irc-nickname=FixBotDev \
--irc-channel=#fixme-test \
--api-port=34889 "
--- a/docs/etc_init.d/fixbot-logwatch Thu Feb 04 19:46:31 2010 +0200
+++ b/docs/etc_init.d/fixbot-logwatch Thu Feb 04 19:54:49 2010 +0200
@@ -16,20 +16,19 @@
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
-# fixbot stuff
-FIXBOT_NAME=fixbot-logwatch
-# what plugin to run
-TWISTD_PLUGIN=fixbot_logwatch
-DESC="FixBot Logwatch component"
-PIDFILE=/var/run/$FIXBOT_NAME.pid
-SCRIPTNAME=/etc/init.d/$FIXBOT_NAME
+# twisted plugin to run
+PLUGIN_NAME=fixbot-logwatch
+PLUGIN_DOC="FixBot Logwatch component"
+
+TWISTD_PIDFILE=/var/run/$PLUGIN_NAME.pid
+
# custom arguments to twistd(1)
TWISTD_ARGS=
-# custom arguments to fixbot, see `twistd fixbot_logwatch --help`
-FIXBOT_ARGS=
+# custom arguments to fixbot, see `twistd fixbot_nexus --help`
+PLUGIN_ARGS=
-# twistd stuff
+# the daemon we run is twistd
DAEMON_NAME=twistd
DAEMON=/usr/bin/$DAEMON_NAME
@@ -37,10 +36,10 @@
[ -x "$DAEMON" ] || exit 0
# Read configuration variable file if it is present
-[ -r /etc/default/$FIXBOT_NAME ] && . /etc/default/$FIXBOT_NAME
+[ -r /etc/default/$PLUGIN_NAME ] && . /etc/default/$PLUGIN_NAME
# what arguments we run with
-DAEMON_ARGS="--pidfile=$PIDFILE $TWISTD_ARGS $TWISTD_PLUGIN $FIXBOT_ARGS"
+DAEMON_ARGS="--pidfile=$PIDFILE $TWISTD_ARGS $PLUGIN_NAME $PLUGIN_ARGS"
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
@@ -103,13 +102,13 @@
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
#
- start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME_DAEMON
+ start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $DAEMON_NAME
return 0
}
case "$1" in
start)
- [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$FIXBOT_NAME"
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $PLUGIN_DESC" "$PLUGIN_NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
@@ -117,7 +116,7 @@
esac
;;
stop)
- [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$FIXBOT_NAME"
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $PLUGIN_DESC" "$PLUGIN_NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
@@ -138,7 +137,7 @@
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
- log_daemon_msg "Restarting $DESC" "$FIXBOT_NAME"
+ log_daemon_msg "Restarting $PLUGIN_DESC" "$PLUGIN_NAME"
do_stop
case "$?" in
0|1)
@@ -156,8 +155,8 @@
esac
;;
*)
- #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
- echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ #echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $0 {start|stop|restart|force-reload}" >&2
exit 3
;;
esac
--- a/docs/etc_init.d/fixbot-nexus Thu Feb 04 19:46:31 2010 +0200
+++ b/docs/etc_init.d/fixbot-nexus Thu Feb 04 19:54:49 2010 +0200
@@ -16,20 +16,19 @@
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
-# fixbot stuff
-FIXBOT_NAME=fixbot-nexus
-# what plugin to run
-TWISTD_PLUGIN=fixbot_nexus
-DESC="FixBot Nexus component"
-PIDFILE=/var/run/$FIXBOT_NAME.pid
-SCRIPTNAME=/etc/init.d/$FIXBOT_NAME
+# twisted plugin to run
+PLUGIN_NAME=fixbot-nexus
+PLUGIN_DOC="FixBot Nexus component"
+
+TWISTD_PIDFILE=/var/run/$PLUGIN_NAME.pid
+
# custom arguments to twistd(1)
TWISTD_ARGS=
# custom arguments to fixbot, see `twistd fixbot_nexus --help`
-FIXBOT_ARGS=
+PLUGIN_ARGS=
-# twistd stuff
+# the daemon we run is twistd
DAEMON_NAME=twistd
DAEMON=/usr/bin/$DAEMON_NAME
@@ -37,10 +36,10 @@
[ -x "$DAEMON" ] || exit 0
# Read configuration variable file if it is present
-[ -r /etc/default/$FIXBOT_NAME ] && . /etc/default/$FIXBOT_NAME
+[ -r /etc/default/$PLUGIN_NAME ] && . /etc/default/$PLUGIN_NAME
# what arguments we run with
-DAEMON_ARGS="--pidfile=$PIDFILE $TWISTD_ARGS $TWISTD_PLUGIN $FIXBOT_ARGS"
+DAEMON_ARGS="--pidfile=$PIDFILE $TWISTD_ARGS $PLUGIN_NAME $PLUGIN_ARGS"
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
@@ -103,13 +102,13 @@
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
#
- start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME_DAEMON
+ start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $DAEMON_NAME
return 0
}
case "$1" in
start)
- [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$FIXBOT_NAME"
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $PLUGIN_DESC" "$PLUGIN_NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
@@ -117,7 +116,7 @@
esac
;;
stop)
- [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$FIXBOT_NAME"
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $PLUGIN_DESC" "$PLUGIN_NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
@@ -138,7 +137,7 @@
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
- log_daemon_msg "Restarting $DESC" "$FIXBOT_NAME"
+ log_daemon_msg "Restarting $PLUGIN_DESC" "$PLUGIN_NAME"
do_stop
case "$?" in
0|1)
@@ -156,8 +155,8 @@
esac
;;
*)
- #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
- echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ #echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $0 {start|stop|restart|force-reload}" >&2
exit 3
;;
esac
--- a/twisted/plugins/fixbot_logwatch_plugin.py Thu Feb 04 19:46:31 2010 +0200
+++ b/twisted/plugins/fixbot_logwatch_plugin.py Thu Feb 04 19:54:49 2010 +0200
@@ -20,7 +20,7 @@
class MyServiceMaker (object) :
implements(IServiceMaker, IPlugin)
- tapname = "fixbot_logwatch"
+ tapname = "fixbot-logwatch"
description = "FixBot (Logwatcher component)"
options = LogwatchOptions
--- a/twisted/plugins/fixbot_nexus_plugin.py Thu Feb 04 19:46:31 2010 +0200
+++ b/twisted/plugins/fixbot_nexus_plugin.py Thu Feb 04 19:54:49 2010 +0200
@@ -27,7 +27,7 @@
class MyServiceMaker (object) :
implements(IServiceMaker, IPlugin)
- tapname = "fixbot_nexus"
+ tapname = "fixbot-nexus"
description = "FixBot (nexus component)"
options = NexusOptions