# This File is licensed under the GPL.
# Services handled by this script: # User-Agent jabber user directory (http://user-agent.jabberstudio.org) # MUC (http://muc.jabberstudio.org) # AIM-transport (http://aim-transport.jabberstudio.org) # MSN-transport (http://msn-transport.jabberstudio.org) # Yahoo!-transport (http://yahoo-transport.jabberstudio.org) # Chatbot (http://chatbot.jabberstudio.org) # Proxy65 Bytestreaming (http://proxy65.jabberstudio.org) # # # /etc/init.d/jabberd # ### BEGIN INIT INFO # Provides: jabberd # Required-Start: $network # Required-Stop: $network # Default-Start: 3 # Default-Stop: 0 1 2 6 # Description: Start the Jabberd daemon and components ### END INIT INFO
. /etc/rc.status . /etc/rc.config
# Shell functions sourced from /etc/rc.status: # rc_check check and set local and overall rc status # rc_status check and set local and overall rc status # rc_status -v ditto but be verbose in local rc status # rc_status -v -r ditto and clear the local rc status # rc_failed set local and overall rc status to failed # rc_reset clear local rc status (overall remains) # rc_exit exit appropriate to overall rc status
# To disable a service, remove it's entry from the list below. SERVICES="jabber msn yahoo aim muc jud chatbot proxy65"
# needed to start chatbot PWD=$(pwd)
# jabberd binary location JABBERD=/usr/local/jabber/jabberd/jabberd # jabber.xml location JABBERXML=/usr/local/jabber/jabber.xml
# transport xml config locations MSNXML=/usr/local/jabber/msn/msn.xml AIMXML=/usr/local/jabber/aim/aim.xml YAHOOXML=/usr/local/jabber/yahoo/yahoo.xml
# muc.xml location MUCXML=/usr/local/jabber/muc/muc.xml
# chatbot location CHATBOTDIR=/usr/local/jabber/chatbot CHATBOTXML=/usr/local/jabber/chatbot/config.xml
# user-agent location (using user-agent.jabberstudio.org, not using jud-ansi) USERSAGENTDIR=/usr/local/jabber/users-agent
# proxy65 stuff TWISTD=/usr/bin/twistd # proxy65 .tap location PROXYTAP=/usr/local/jabber/proxy65.tap
# pid storage PIDDIR=/var/run/jabber
rc_reset
jabber(){ echo -n "Starting jabber daemon server: jabberd" startproc -f $JABBERD -c $JABBERXML &>/dev/null rc_status -v
}
stop_proc(){ case "$NAME" in proxy65) ps ax |grep twistd |grep $NAME &>/dev/null if [ "$?" -eq 0 ]; then kill -9 `cat $PIDDIR/$NAME.pid` rm -f $PIDDIR/$NAME.pid else echo echo -n "($NAME is not running)" rm -f $PIDDIR/$NAME.pid fi ;; chatbot) ps ax |grep perl |grep chatbot &>/dev/null if [ "$?" -eq 0 ]; then kill -9 `ps ax |grep perl |grep chatbot |grep -v grep |awk '{ print $1 }'` &>/dev/null rm -f $PIDDIR/$NAME.pid else echo echo -n "($NAME is not running)" rm -f $PIDDIR/$NAME.pid fi ;; jud) ps ax |grep perl |grep users-agent &>/dev/null if [ "$?" -eq 0 ]; then kill -9 `ps ax |grep perl |grep users-agent |grep -v grep |awk '{ print $1 }'` &>/dev/null rm -f $PIDDIR/$NAME.pid else echo echo -n "($NAME is not running)" rm -f $PIDDIR/$NAME.pid fi ;; *) # Handle all regular jabber children with one case statement ps ax |grep jabberd |grep $NAME.xml &>/dev/null if [ "$?" -eq 0 ]; then kill -9 `ps ax |grep jabberd |grep $NAME.xml |grep -v grep |awk '{ print $1 }'` &>/dev/null rm -f $PIDDIR/$NAME.pid else echo echo -n "($NAME is not running)" rm -f $PIDDIR/$NAME.pid fi ;; esac }
yahoo(){ echo -n "Starting Yahoo! Transport: yahoo-t" startproc -f $JABBERD -c $YAHOOXML &>/dev/null rc_status -v }
aim(){ echo -n "Starting AIM Transport: AIM-t" startproc -f $JABBERD -c $AIMXML &>/dev/null rc_status -v }
msn(){ echo -n "Starting MSN Transport: MSN-t" startproc -f $JABBERD -c $MSNXML &>/dev/null rc_status -v }
muc(){ echo -n "Starting Multi-User Conferencing: muc" startproc -f $JABBERD -c $MUCXML &>/dev/null rc_status -v }
proxy65(){ echo -n "Starting Jabber File Transfer Service: proxy65" startproc -f $TWISTD -q -f $PROXYTAP --pidfile $PIDDIR/proxy65.pid --logfile=/usr/local/jabber/proxy65/proxy65.log &>/dev/null # python and perl scripts generate weird exit/status codes; I fool myself here that everything is ok. rc_reset rc_status -v }
chatbot(){ echo -n "Starting Chatbot Service: chatbot" cd $CHATBOTDIR $CHATBOTDIR/chatbot --config=$CHATBOTXML &>/dev/null & # python and perl scripts generate weird exit/status codes; I fool myself here that everything is ok. rc_reset rc_status -v cd $PWD }
jud(){ echo -n "Starting Jabber User Directory" startproc -f $USERSAGENTDIR/users-agent &>/dev/null # python and perl scripts generate weird exit/status codes; I fool myself here that everything is ok. rc_reset rc_status -v }
# To disable a service, remove it's entry from the $SERVICES variable below.
SERVICES="jabber msn yahoo aim muc jud chatbot proxy65"
case "$1" in start) for each in $SERVICES; do $each done ;; stop) echo -n "Stopping jabber daemon server: jabberd" for each in $SERVICES; do NAME=$each stop_proc done rc_status -v ;; restart) $0 stop $0 start ;; msnkick) NAME=msn echo -n "Stopping MSN Transport: MSN-t" stop_proc rc_status -v msn ;; aimkick) NAME=aim echo -n "Stopping AIM Transport: AIM-t" stop_proc rc_status -v aim ;; muckick) NAME=muc echo -n "Stopping Multi-User Conferencing: muc" stop_proc rc_status -v muc ;; judkick) NAME=jud echo -n "Stopping Jabber User Directory" stop_proc rc_status -v jud ;; yahookick) NAME=yahoo echo -n "Stopping Yahoo! Transport: yahoo-t" stop_proc rc_status -v yahoo ;; proxykick) NAME=proxy65 echo -n "Restarting Jabber File Transfer Service: proxy65" stop_proc rc_status -v proxy65 ;; botkick) NAME=chatbot echo -n "Restarting jabber help chatbot: chatbot" stop_proc rc_status -v chatbot ;; *) echo "Usage: /etc/init.d/jabberd {start|stop|restart|msnkick|aimkick|yahookick|muckick|judkick|proxykick|botkick}" exit 1 ;; esac rc_exit
[2004-04-01 20:18 CST] haydungngay (email) # Services handled by this script: # User-Agent jabber user directory (http://user-agent.jabberstudio.org) # MUC (http://muc.jabberstudio.org) # AIM-transport (http://aim-transport.jabberstudio.org) # MSN-transport (http://msn-transport.jabberstudio.org) # Yahoo!-transport (http://yahoo-transport.jabberstudio.org) # Chatbot (http://chatbot.jabberstudio.org) # Proxy65 Bytestreaming (http://proxy65.jabberstudio.org) # # # /etc/init.d/jabberd # ### BEGIN INIT INFO # Provides: jabberd # Required-Start: $network # Required-Stop: $network # Default-Start: 3 # Default-Stop: 0 1 2 6 # Description: Start the Jabberd daemon and components ### END INIT INFO
[2004-04-01 20:19 CST] haydungngay (email) # Services handled by this script: # User-Agent jabber user directory (http://user-agent.jabberstudio.org) # MUC (http://muc.jabberstudio.org) # AIM-transport (http://aim-transport.jabberstudio.org) # MSN-transport (http://msn-transport.jabberstudio.org) # Yahoo!-transport (http://yahoo-transport.jabberstudio.org) # Chatbot (http://chatbot.jabberstudio.org) # Proxy65 Bytestreaming (http://proxy65.jabberstudio.org) # # # /etc/init.d/jabberd # ### BEGIN INIT INFO # Provides: jabberd # Required-Start: $network # Required-Stop: $network # Default-Start: 3 # Default-Stop: 0 1 2 6 # Description: Start the Jabberd daemon and components ### END INIT INFO
# Services handled by this script: # User-Agent jabber user directory (http://user-agent.jabberstudio.org) # MUC (http://muc.jabberstudio.org) # AIM-transport (http://aim-transport.jabberstudio.org) # MSN-transport (http://msn-transport.jabberstudio.org) # Yahoo!-transport (http://yahoo-transport.jabberstudio.org) # Chatbot (http://chatbot.jabberstudio.org) # Proxy65 Bytestreaming (http://proxy65.jabberstudio.org) # # # /etc/init.d/jabberd # ### BEGIN INIT INFO # Provides: jabberd # Required-Start: $network # Required-Stop: $network # Default-Start: 3 # Default-Stop: 0 1 2 6 # Description: Start the Jabberd daemon and components ### END INIT INFO
# Services handled by this script: # User-Agent jabber user directory (http://user-agent.jabberstudio.org) # MUC (http://muc.jabberstudio.org) # AIM-transport (http://aim-transport.jabberstudio.org) # MSN-transport (http://msn-transport.jabberstudio.org) # Yahoo!-transport (http://yahoo-transport.jabberstudio.org) # Chatbot (http://chatbot.jabberstudio.org) # Proxy65 Bytestreaming (http://proxy65.jabberstudio.org) # # # /etc/init.d/jabberd # ### BEGIN INIT INFO # Provides: jabberd # Required-Start: $network # Required-Stop: $network # Default-Start: 3 # Default-Stop: 0 1 2 6 # Description: Start the Jabberd daemon and components ### END INIT INFO transport.jabberstudio.org) # Chatbot (http://chatbot.jabberstudio.org) # Proxy65 Bytestreaming (http://proxy65.jabberstudio.org) # # # /etc/init.d/jabberd # ### BEGIN INIT INFO # Provides: jabberd # Required-Start: $network # Required-Stop: $network # Default-Start: 3 # Default-Stop: 0 1 2 6 # Description: Start the Jabberd daemon and components ### END INIT INFO
[2004-04-01 20:22 CST] haydungngay (email) #!/bin/sh
#
# jabber init script to start jabber daemon and various components on SuSE distros.
#
# Written on 10/24/2003 by Sean Knox (rc functions from existing SuSE scripts)
# You'll likely need to hack it and replace with your settings.
# Suggestions welcome (and needed!). Error checking for one could be greatly improved.
# This File is licensed under the GPL.
# Services handled by this script: # User-Agent jabber user directory (http://user-agent.jabberstudio.org) # MUC (http://muc.jabberstudio.org) # AIM-transport (http://aim-transport.jabberstudio.org) # MSN-transport (http://msn-transport.jabberstudio.org) # Yahoo!-transport (http://yahoo-transport.jabberstudio.org) # Chatbot (http://chatbot.jabberstudio.org) # Proxy65 Bytestreaming (http://proxy65.jabberstudio.org) # # # /etc/init.d/jabberd # ### BEGIN INIT INFO # Provides: jabberd # Required-Start: $network # Required-Stop: $network # Default-Start: 3 # Default-Stop: 0 1 2 6 # Description: Start the Jabberd daemon and components ### END INIT INFO
. /etc/rc.status . /etc/rc.config
# Shell functions sourced from /etc/rc.status: # rc_check check and set local and overall rc status # rc_status check and set local and overall rc status # rc_status -v ditto but be verbose in local rc status # rc_status -v -r ditto and clear the local rc status # rc_failed set local and overall rc status to failed # rc_reset clear local rc status (overall remains) # rc_exit exit appropriate to overall rc status
# To disable a service, remove it's entry from the list below. SERVICES="jabber msn yahoo aim muc jud chatbot proxy65"
# needed to start chatbot PWD=$(pwd)
# jabberd binary location JABBERD=/usr/local/jabber/jabberd/jabberd # jabber.xml location JABBERXML=/usr/local/jabber/jabber.xml
# transport xml config locations MSNXML=/usr/local/jabber/msn/msn.xml AIMXML=/usr/local/jabber/aim/aim.xml YAHOOXML=/usr/local/jabber/yahoo/yahoo.xml
# muc.xml location MUCXML=/usr/local/jabber/muc/muc.xml
# chatbot location CHATBOTDIR=/usr/local/jabber/chatbot CHATBOTXML=/usr/local/jabber/chatbot/config.xml
# user-agent location (using user-agent.jabberstudio.org, not using jud-ansi) USERSAGENTDIR=/usr/local/jabber/users-agent
# proxy65 stuff TWISTD=/usr/bin/twistd # proxy65 .tap location PROXYTAP=/usr/local/jabber/proxy65.tap
# pid storage PIDDIR=/var/run/jabber
rc_reset
jabber(){ echo -n "Starting jabber daemon server: jabberd" startproc -f $JABBERD -c $JABBERXML &>/dev/null rc_status -v
}
stop_proc(){ case "$NAME" in proxy65) ps ax |grep twistd |grep $NAME &>/dev/null if [ "$?" -eq 0 ]; then kill -9 `cat $PIDDIR/$NAME.pid` rm -f $PIDDIR/$NAME.pid else echo echo -n "($NAME is not running)" rm -f $PIDDIR/$NAME.pid fi ;; chatbot) ps ax |grep perl |grep chatbot &>/dev/null if [ "$?" -eq 0 ]; then kill -9 `ps ax |grep perl |grep chatbot |grep -v grep |awk '{ print $1 }'` &>/dev/null rm -f $PIDDIR/$NAME.pid else echo echo -n "($NAME is not running)" rm -f $PIDDIR/$NAME.pid fi ;; jud) ps ax |grep perl |grep users-agent &>/dev/null if [ "$?" -eq 0 ]; then kill -9 `ps ax |grep perl |grep users-agent |grep -v grep |awk '{ print $1 }'` &>/dev/null rm -f $PIDDIR/$NAME.pid else echo echo -n "($NAME is not running)" rm -f $PIDDIR/$NAME.pid fi ;; *) # Handle all regular jabber children with one case statement ps ax |grep jabberd |grep $NAME.xml &>/dev/null if [ "$?" -eq 0 ]; then kill -9 `ps ax |grep jabberd |grep $NAME.xml |grep -v grep |awk '{ print $1 }'` &>/dev/null rm -f $PIDDIR/$NAME.pid else echo echo -n "($NAME is not running)" rm -f $PIDDIR/$NAME.pid fi ;; esac }
yahoo(){ echo -n "Starting Yahoo! Transport: yahoo-t" startproc -f $JABBERD -c $YAHOOXML &>/dev/null rc_status -v }
aim(){ echo -n "Starting AIM Transport: AIM-t" startproc -f $JABBERD -c $AIMXML &>/dev/null rc_status -v }
msn(){ echo -n "Starting MSN Transport: MSN-t" startproc -f $JABBERD -c $MSNXML &>/dev/null rc_status -v }
muc(){ echo -n "Starting Multi-User Conferencing: muc" startproc -f $JABBERD -c $MUCXML &>/dev/null rc_status -v }
proxy65(){ echo -n "Starting Jabber File Transfer Service: proxy65" startproc -f $TWISTD -q -f $PROXYTAP --pidfile $PIDDIR/proxy65.pid --logfile=/usr/local/jabber/proxy65/proxy65.log &>/dev/null # python and perl scripts generate weird exit/status codes; I fool myself here that everything is ok. rc_reset rc_status -v }
chatbot(){ echo -n "Starting Chatbot Service: chatbot" cd $CHATBOTDIR $CHATBOTDIR/chatbot --config=$CHATBOTXML &>/dev/null & # python and perl scripts generate weird exit/status codes; I fool myself here that everything is ok. rc_reset rc_status -v cd $PWD }
jud(){ echo -n "Starting Jabber User Directory" startproc -f $USERSAGENTDIR/users-agent &>/dev/null # python and perl scripts generate weird exit/status codes; I fool myself here that everything is ok. rc_reset rc_status -v }
# To disable a service, remove it's entry from the $SERVICES variable below.
SERVICES="jabber msn yahoo aim muc jud chatbot proxy65"
case "$1" in start) for each in $SERVICES; do $each done ;; stop) echo -n "Stopping jabber daemon server: jabberd" for each in $SERVICES; do NAME=$each stop_proc done rc_status -v ;; restart) $0 stop $0 start ;; msnkick) NAME=msn echo -n "Stopping MSN Transport: MSN-t" stop_proc rc_status -v msn ;; aimkick) NAME=aim echo -n "Stopping AIM Transport: AIM-t" stop_proc rc_status -v aim ;; muckick) NAME=muc echo -n "Stopping Multi-User Conferencing: muc" stop_proc rc_status -v muc ;; judkick) NAME=jud echo -n "Stopping Jabber User Directory" stop_proc rc_status -v jud ;; yahookick) NAME=yahoo echo -n "Stopping Yahoo! Transport: yahoo-t" stop_proc rc_status -v yahoo ;; proxykick) NAME=proxy65 echo -n "Restarting Jabber File Transfer Service: proxy65" stop_proc rc_status -v proxy65 ;; botkick) NAME=chatbot echo -n "Restarting jabber help chatbot: chatbot" stop_proc rc_status -v chatbot ;; *) echo "Usage: /etc/init.d/jabberd {start|stop|restart|msnkick|aimkick|yahookick|muckick|judkick|proxykick|botkick}" exit 1 ;; esac rc_exit
[2004-04-01 21:27 CST] haydungngay (email) #!/bin/sh
#
# jabber init script to start jabber daemon and various components on SuSE distros.
#
# Written on 10/24/2003 by Sean Knox (rc functions from existing SuSE scripts)
# You'll likely need to hack it and replace with your settings.
# Suggestions welcome (and needed!). Error checking for one could be greatly improved.
# This File is licensed under the GPL.
# Services handled by this script: # User-Agent jabber user directory (http://user-agent.jabberstudio.org) # MUC (http://muc.jabberstudio.org) # AIM-transport (http://aim-transport.jabberstudio.org) # MSN-transport (http://msn-transport.jabberstudio.org) # Yahoo!-transport (http://yahoo-transport.jabberstudio.org) # Chatbot (http://chatbot.jabberstudio.org) # Proxy65 Bytestreaming (http://proxy65.jabberstudio.org) # # # /etc/init.d/jabberd # ### BEGIN INIT INFO # Provides: jabberd # Required-Start: $network # Required-Stop: $network # Default-Start: 3 # Default-Stop: 0 1 2 6 # Description: Start the Jabberd daemon and components ### END INIT INFO
. /etc/rc.status . /etc/rc.config
# Shell functions sourced from /etc/rc.status: # rc_check check and set local and overall rc status # rc_status check and set local and overall rc status # rc_status -v ditto but be verbose in local rc status # rc_status -v -r ditto and clear the local rc status # rc_failed set local and overall rc status to failed # rc_reset clear local rc status (overall remains) # rc_exit exit appropriate to overall rc status
# To disable a service, remove it's entry from the list below. SERVICES="jabber msn yahoo aim muc jud chatbot proxy65"
# needed to start chatbot PWD=$(pwd)
# jabberd binary location JABBERD=/usr/local/jabber/jabberd/jabberd # jabber.xml location JABBERXML=/usr/local/jabber/jabber.xml
# transport xml config locations MSNXML=/usr/local/jabber/msn/msn.xml AIMXML=/usr/local/jabber/aim/aim.xml YAHOOXML=/usr/local/jabber/yahoo/yahoo.xml
# muc.xml location MUCXML=/usr/local/jabber/muc/muc.xml
# chatbot location CHATBOTDIR=/usr/local/jabber/chatbot CHATBOTXML=/usr/local/jabber/chatbot/config.xml
# user-agent location (using user-agent.jabberstudio.org, not using jud-ansi) USERSAGENTDIR=/usr/local/jabber/users-agent
# proxy65 stuff TWISTD=/usr/bin/twistd # proxy65 .tap location PROXYTAP=/usr/local/jabber/proxy65.tap
# pid storage PIDDIR=/var/run/jabber
rc_reset
jabber(){ echo -n "Starting jabber daemon server: jabberd" startproc -f $JABBERD -c $JABBERXML &>/dev/null rc_status -v
}
stop_proc(){ case "$NAME" in proxy65) ps ax |grep twistd |grep $NAME &>/dev/null if [ "$?" -eq 0 ]; then kill -9 `cat $PIDDIR/$NAME.pid` rm -f $PIDDIR/$NAME.pid else echo echo -n "($NAME is not running)" rm -f $PIDDIR/$NAME.pid fi ;; chatbot) ps ax |grep perl |grep chatbot &>/dev/null if [ "$?" -eq 0 ]; then kill -9 `ps ax |grep perl |grep chatbot |grep -v grep |awk '{ print $1 }'` &>/dev/null rm -f $PIDDIR/$NAME.pid else echo echo -n "($NAME is not running)" rm -f $PIDDIR/$NAME.pid fi ;; jud) ps ax |grep perl |grep users-agent &>/dev/null if [ "$?" -eq 0 ]; then kill -9 `ps ax |grep perl |grep users-agent |grep -v grep |awk '{ print $1 }'` &>/dev/null rm -f $PIDDIR/$NAME.pid else echo echo -n "($NAME is not running)" rm -f $PIDDIR/$NAME.pid fi ;; *) # Handle all regular jabber children with one case statement ps ax |grep jabberd |grep $NAME.xml &>/dev/null if [ "$?" -eq 0 ]; then kill -9 `ps ax |grep jabberd |grep $NAME.xml |grep -v grep |awk '{ print $1 }'` &>/dev/null rm -f $PIDDIR/$NAME.pid else echo echo -n "($NAME is not running)" rm -f $PIDDIR/$NAME.pid fi ;; esac }
yahoo(){ echo -n "Starting Yahoo! Transport: yahoo-t" startproc -f $JABBERD -c $YAHOOXML &>/dev/null rc_status -v }
aim(){ echo -n "Starting AIM Transport: AIM-t" startproc -f $JABBERD -c $AIMXML &>/dev/null rc_status -v }
msn(){ echo -n "Starting MSN Transport: MSN-t" startproc -f $JABBERD -c $MSNXML &>/dev/null rc_status -v }
muc(){ echo -n "Starting Multi-User Conferencing: muc" startproc -f $JABBERD -c $MUCXML &>/dev/null rc_status -v }
proxy65(){ echo -n "Starting Jabber File Transfer Service: proxy65" startproc -f $TWISTD -q -f $PROXYTAP --pidfile $PIDDIR/proxy65.pid --logfile=/usr/local/jabber/proxy65/proxy65.log &>/dev/null # python and perl scripts generate weird exit/status codes; I fool myself here that everything is ok. rc_reset rc_status -v }
chatbot(){ echo -n "Starting Chatbot Service: chatbot" cd $CHATBOTDIR $CHATBOTDIR/chatbot --config=$CHATBOTXML &>/dev/null & # python and perl scripts generate weird exit/status codes; I fool myself here that everything is ok. rc_reset rc_status -v cd $PWD }
jud(){ echo -n "Starting Jabber User Directory" startproc -f $USERSAGENTDIR/users-agent &>/dev/null # python and perl scripts generate weird exit/status codes; I fool myself here that everything is ok. rc_reset rc_status -v }
# To disable a service, remove it's entry from the $SERVICES variable below.
SERVICES="jabber msn yahoo aim muc jud chatbot proxy65"
case "$1" in start) for each in $SERVICES; do $each done ;; stop) echo -n "Stopping jabber daemon server: jabberd" for each in $SERVICES; do NAME=$each stop_proc done rc_status -v ;; restart) $0 stop $0 start ;; msnkick) NAME=msn echo -n "Stopping MSN Transport: MSN-t" stop_proc rc_status -v msn ;; aimkick) NAME=aim echo -n "Stopping AIM Transport: AIM-t" stop_proc rc_status -v aim ;; muckick) NAME=muc echo -n "Stopping Multi-User Conferencing: muc" stop_proc rc_status -v muc ;; judkick) NAME=jud echo -n "Stopping Jabber User Directory" stop_proc rc_status -v jud ;; yahookick) NAME=yahoo echo -n "Stopping Yahoo! Transport: yahoo-t" stop_proc rc_status -v yahoo ;; proxykick) NAME=proxy65 echo -n "Restarting Jabber File Transfer Service: proxy65" stop_proc rc_status -v proxy65 ;; botkick) NAME=chatbot echo -n "Restarting jabber help chatbot: chatbot" stop_proc rc_status -v chatbot ;; *) echo "Usage: /etc/init.d/jabberd {start|stop|restart|msnkick|aimkick|yahookick|muckick|judkick|proxykick|botkick}" exit 1 ;; esac rc_exit
[2004-04-01 21:28 CST] haydungngay (email) #!/bin/sh
#
# jabber init script to start jabber daemon and various components on SuSE distros.
#
# Written on 10/24/2003 by Sean Knox (rc functions from existing SuSE scripts)
# You'll likely need to hack it and replace with your settings.
# Suggestions welcome (and needed!). Error checking for one could be greatly improved.
# This File is licensed under the GPL.
# Services handled by this script: # User-Agent jabber user directory (http://user-agent.jabberstudio.org) # MUC (http://muc.jabberstudio.org) # AIM-transport (http://aim-transport.jabberstudio.org) # MSN-transport (http://msn-transport.jabberstudio.org) # Yahoo!-transport (http://yahoo-transport.jabberstudio.org) # Chatbot (http://chatbot.jabberstudio.org) # Proxy65 Bytestreaming (http://proxy65.jabberstudio.org) # # # /etc/init.d/jabberd # ### BEGIN INIT INFO # Provides: jabberd # Required-Start: $network # Required-Stop: $network # Default-Start: 3 # Default-Stop: 0 1 2 6 # Description: Start the Jabberd daemon and components ### END INIT INFO
. /etc/rc.status . /etc/rc.config
# Shell functions sourced from /etc/rc.status: # rc_check check and set local and overall rc status # rc_status check and set local and overall rc status # rc_status -v ditto but be verbose in local rc status # rc_status -v -r ditto and clear the local rc status # rc_failed set local and overall rc status to failed # rc_reset clear local rc status (overall remains) # rc_exit exit appropriate to overall rc status
# To disable a service, remove it's entry from the list below. SERVICES="jabber msn yahoo aim muc jud chatbot proxy65"
# needed to start chatbot PWD=$(pwd)
# jabberd binary location JABBERD=/usr/local/jabber/jabberd/jabberd # jabber.xml location JABBERXML=/usr/local/jabber/jabber.xml
# transport xml config locations MSNXML=/usr/local/jabber/msn/msn.xml AIMXML=/usr/local/jabber/aim/aim.xml YAHOOXML=/usr/local/jabber/yahoo/yahoo.xml
# muc.xml location MUCXML=/usr/local/jabber/muc/muc.xml
# chatbot location CHATBOTDIR=/usr/local/jabber/chatbot CHATBOTXML=/usr/local/jabber/chatbot/config.xml
# user-agent location (using user-agent.jabberstudio.org, not using jud-ansi) USERSAGENTDIR=/usr/local/jabber/users-agent
# proxy65 stuff TWISTD=/usr/bin/twistd # proxy65 .tap location PROXYTAP=/usr/local/jabber/proxy65.tap
# pid storage PIDDIR=/var/run/jabber
rc_reset
jabber(){ echo -n "Starting jabber daemon server: jabberd" startproc -f $JABBERD -c $JABBERXML &>/dev/null rc_status -v
}
stop_proc(){ case "$NAME" in proxy65) ps ax |grep twistd |grep $NAME &>/dev/null if [ "$?" -eq 0 ]; then kill -9 `cat $PIDDIR/$NAME.pid` rm -f $PIDDIR/$NAME.pid else echo echo -n "($NAME is not running)" rm -f $PIDDIR/$NAME.pid fi ;; chatbot) ps ax |grep perl |grep chatbot &>/dev/null if [ "$?" -eq 0 ]; then kill -9 `ps ax |grep perl |grep chatbot |grep -v grep |awk '{ print $1 }'` &>/dev/null rm -f $PIDDIR/$NAME.pid else echo echo -n "($NAME is not running)" rm -f $PIDDIR/$NAME.pid fi ;; jud) ps ax |grep perl |grep users-agent &>/dev/null if [ "$?" -eq 0 ]; then kill -9 `ps ax |grep perl |grep users-agent |grep -v grep |awk '{ print $1 }'` &>/dev/null rm -f $PIDDIR/$NAME.pid else echo echo -n "($NAME is not running)" rm -f $PIDDIR/$NAME.pid fi ;; *) # Handle all regular jabber children with one case statement ps ax |grep jabberd |grep $NAME.xml &>/dev/null if [ "$?" -eq 0 ]; then kill -9 `ps ax |grep jabberd |grep $NAME.xml |grep -v grep |awk '{ print $1 }'` &>/dev/null rm -f $PIDDIR/$NAME.pid else echo echo -n "($NAME is not running)" rm -f $PIDDIR/$NAME.pid fi ;; esac }
yahoo(){ echo -n "Starting Yahoo! Transport: yahoo-t" startproc -f $JABBERD -c $YAHOOXML &>/dev/null rc_status -v }
aim(){ echo -n "Starting AIM Transport: AIM-t" startproc -f $JABBERD -c $AIMXML &>/dev/null rc_status -v }
msn(){ echo -n "Starting MSN Transport: MSN-t" startproc -f $JABBERD -c $MSNXML &>/dev/null rc_status -v }
muc(){ echo -n "Starting Multi-User Conferencing: muc" startproc -f $JABBERD -c $MUCXML &>/dev/null rc_status -v }
proxy65(){ echo -n "Starting Jabber File Transfer Service: proxy65" startproc -f $TWISTD -q -f $PROXYTAP --pidfile $PIDDIR/proxy65.pid --logfile=/usr/local/jabber/proxy65/proxy65.log &>/dev/null # python and perl scripts generate weird exit/status codes; I fool myself here that everything is ok. rc_reset rc_status -v }
chatbot(){ echo -n "Starting Chatbot Service: chatbot" cd $CHATBOTDIR $CHATBOTDIR/chatbot --config=$CHATBOTXML &>/dev/null & # python and perl scripts generate weird exit/status codes; I fool myself here that everything is ok. rc_reset rc_status -v cd $PWD }
jud(){ echo -n "Starting Jabber User Directory" startproc -f $USERSAGENTDIR/users-agent &>/dev/null # python and perl scripts generate weird exit/status codes; I fool myself here that everything is ok. rc_reset rc_status -v }
# To disable a service, remove it's entry from the $SERVICES variable below.
SERVICES="jabber msn yahoo aim muc jud chatbot proxy65"
case "$1" in start) for each in $SERVICES; do $each done ;; stop) echo -n "Stopping jabber daemon server: jabberd" for each in $SERVICES; do NAME=$each stop_proc done rc_status -v ;; restart) $0 stop $0 start ;; msnkick) NAME=msn echo -n "Stopping MSN Transport: MSN-t" stop_proc rc_status -v msn ;; aimkick) NAME=aim echo -n "Stopping AIM Transport: AIM-t" stop_proc rc_status -v aim ;; muckick) NAME=muc echo -n "Stopping Multi-User Conferencing: muc" stop_proc rc_status -v muc ;; judkick) NAME=jud echo -n "Stopping Jabber User Directory" stop_proc rc_status -v jud ;; yahookick) NAME=yahoo echo -n "Stopping Yahoo! Transport: yahoo-t" stop_proc rc_status -v yahoo ;; proxykick) NAME=proxy65 echo -n "Restarting Jabber File Transfer Service: proxy65" stop_proc rc_status -v proxy65 ;; botkick) NAME=chatbot echo -n "Restarting jabber help chatbot: chatbot" stop_proc rc_status -v chatbot ;; *) echo "Usage: /etc/init.d/jabberd {start|stop|restart|msnkick|aimkick|yahookick|muckick|judkick|proxykick|botkick}" exit 1 ;; esac rc_exit
[2004-04-02 21:13 CST] kehuydiet (email) hi!
thu xem sao
[2004-04-02 21:13 CST] kehuydiet (email) #!/bin/sh
#
# jabber init script to start jabber daemon and various components on SuSE distros.
#
# Written on 10/24/2003 by Sean Knox (rc functions from existing SuSE scripts)
# You'll likely need to hack it and replace with your settings.
# Suggestions welcome (and needed!). Error checking for one could be greatly improved.
# This File is licensed under the GPL.
# Services handled by this script: # User-Agent jabber user directory (http://user-agent.jabberstudio.org) # MUC (http://muc.jabberstudio.org) # AIM-transport (http://aim-transport.jabberstudio.org) # MSN-transport (http://msn-transport.jabberstudio.org) # Yahoo!-transport (http://yahoo-transport.jabberstudio.org) # Chatbot (http://chatbot.jabberstudio.org) # Proxy65 Bytestreaming (http://proxy65.jabberstudio.org) # # # /etc/init.d/jabberd # ### BEGIN INIT INFO # Provides: jabberd # Required-Start: $network # Required-Stop: $network # Default-Start: 3 # Default-Stop: 0 1 2 6 # Description: Start the Jabberd daemon and components ### END INIT INFO
. /etc/rc.status . /etc/rc.config
# Shell functions sourced from /etc/rc.status: # rc_check check and set local and overall rc status # rc_status check and set local and overall rc status # rc_status -v ditto but be verbose in local rc status # rc_status -v -r ditto and clear the local rc status # rc_failed set local and overall rc status to failed # rc_reset clear local rc status (overall remains) # rc_exit exit appropriate to overall rc status
# To disable a service, remove it's entry from the list below. SERVICES="jabber msn yahoo aim muc jud chatbot proxy65"
# needed to start chatbot PWD=$(pwd)
# jabberd binary location JABBERD=/usr/local/jabber/jabberd/jabberd # jabber.xml location JABBERXML=/usr/local/jabber/jabber.xml
# transport xml config locations MSNXML=/usr/local/jabber/msn/msn.xml AIMXML=/usr/local/jabber/aim/aim.xml YAHOOXML=/usr/local/jabber/yahoo/yahoo.xml
# muc.xml location MUCXML=/usr/local/jabber/muc/muc.xml
# chatbot location CHATBOTDIR=/usr/local/jabber/chatbot CHATBOTXML=/usr/local/jabber/chatbot/config.xml
# user-agent location (using user-agent.jabberstudio.org, not using jud-ansi) USERSAGENTDIR=/usr/local/jabber/users-agent
# proxy65 stuff TWISTD=/usr/bin/twistd # proxy65 .tap location PROXYTAP=/usr/local/jabber/proxy65.tap
# pid storage PIDDIR=/var/run/jabber
rc_reset
jabber(){ echo -n "Starting jabber daemon server: jabberd" startproc -f $JABBERD -c $JABBERXML &>/dev/null rc_status -v
}
stop_proc(){ case "$NAME" in proxy65) ps ax |grep twistd |grep $NAME &>/dev/null if [ "$?" -eq 0 ]; then kill -9 `cat $PIDDIR/$NAME.pid` rm -f $PIDDIR/$NAME.pid else echo echo -n "($NAME is not running)" rm -f $PIDDIR/$NAME.pid fi ;; chatbot) ps ax |grep perl |grep chatbot &>/dev/null if [ "$?" -eq 0 ]; then kill -9 `ps ax |grep perl |grep chatbot |grep -v grep |awk '{ print $1 }'` &>/dev/null rm -f $PIDDIR/$NAME.pid else echo echo -n "($NAME is not running)" rm -f $PIDDIR/$NAME.pid fi ;; jud) ps ax |grep perl |grep users-agent &>/dev/null if [ "$?" -eq 0 ]; then kill -9 `ps ax |grep perl |grep users-agent |grep -v grep |awk '{ print $1 }'` &>/dev/null rm -f $PIDDIR/$NAME.pid else echo echo -n "($NAME is not running)" rm -f $PIDDIR/$NAME.pid fi ;; *) # Handle all regular jabber children with one case statement ps ax |grep jabberd |grep $NAME.xml &>/dev/null if [ "$?" -eq 0 ]; then kill -9 `ps ax |grep jabberd |grep $NAME.xml |grep -v grep |awk '{ print $1 }'` &>/dev/null rm -f $PIDDIR/$NAME.pid else echo echo -n "($NAME is not running)" rm -f $PIDDIR/$NAME.pid fi ;; esac }
yahoo(){ echo -n "Starting Yahoo! Transport: yahoo-t" startproc -f $JABBERD -c $YAHOOXML &>/dev/null rc_status -v }
aim(){ echo -n "Starting AIM Transport: AIM-t" startproc -f $JABBERD -c $AIMXML &>/dev/null rc_status -v }
msn(){ echo -n "Starting MSN Transport: MSN-t" startproc -f $JABBERD -c $MSNXML &>/dev/null rc_status -v }
muc(){ echo -n "Starting Multi-User Conferencing: muc" startproc -f $JABBERD -c $MUCXML &>/dev/null rc_status -v }
proxy65(){ echo -n "Starting Jabber File Transfer Service: proxy65" startproc -f $TWISTD -q -f $PROXYTAP --pidfile $PIDDIR/proxy65.pid --logfile=/usr/local/jabber/proxy65/proxy65.log &>/dev/null # python and perl scripts generate weird exit/status codes; I fool myself here that everything is ok. rc_reset rc_status -v }
chatbot(){ echo -n "Starting Chatbot Service: chatbot" cd $CHATBOTDIR $CHATBOTDIR/chatbot --config=$CHATBOTXML &>/dev/null & # python and perl scripts generate weird exit/status codes; I fool myself here that everything is ok. rc_reset rc_status -v cd $PWD }
jud(){ echo -n "Starting Jabber User Directory" startproc -f $USERSAGENTDIR/users-agent &>/dev/null # python and perl scripts generate weird exit/status codes; I fool myself here that everything is ok. rc_reset rc_status -v }
# To disable a service, remove it's entry from the $SERVICES variable below.
SERVICES="jabber msn yahoo aim muc jud chatbot proxy65"
case "$1" in start) for each in $SERVICES; do $each done ;; stop) echo -n "Stopping jabber daemon server: jabberd" for each in $SERVICES; do NAME=$each stop_proc done rc_status -v ;; restart) $0 stop $0 start ;; msnkick) NAME=msn echo -n "Stopping MSN Transport: MSN-t" stop_proc rc_status -v msn ;; aimkick) NAME=aim echo -n "Stopping AIM Transport: AIM-t" stop_proc rc_status -v aim ;; muckick) NAME=muc echo -n "Stopping Multi-User Conferencing: muc" stop_proc rc_status -v muc ;; judkick) NAME=jud echo -n "Stopping Jabber User Directory" stop_proc rc_status -v jud ;; yahookick) NAME=yahoo echo -n "Stopping Yahoo! Transport: yahoo-t" stop_proc rc_status -v yahoo ;; proxykick) NAME=proxy65 echo -n "Restarting Jabber File Transfer Service: proxy65" stop_proc rc_status -v proxy65 ;; botkick) NAME=chatbot echo -n "Restarting jabber help chatbot: chatbot" stop_proc rc_status -v chatbot ;; *) echo "Usage: /etc/init.d/jabberd {start|stop|restart|msnkick|aimkick|yahookick|muckick|judkick|proxykick|botkick}" exit 1 ;; esac rc_exit
#!/bin/sh
#
# jabber init script to start jabber daemon and various components on SuSE distros.
#
# Written on 10/24/2003 by Sean Knox <sean@craigslist.org> (rc functions from existing SuSE scripts)
# You'll likely need to hack it and replace with your settings.
# Suggestions welcome (and needed!). Error checking for one could be greatly improved.
# This File is licensed under the GPL.
# Services handled by this script:
# User-Agent jabber user directory (http://user-agent.jabberstudio.org)
# MUC (http://muc.jabberstudio.org)
# AIM-transport (http://aim-transport.jabberstudio.org)
# MSN-transport (http://msn-transport.jabberstudio.org)
# Yahoo!-transport (http://yahoo-transport.jabberstudio.org)
# Chatbot (http://chatbot.jabberstudio.org)
# Proxy65 Bytestreaming (http://proxy65.jabberstudio.org)
#
#
# /etc/init.d/jabberd
#
### BEGIN INIT INFO
# Provides: jabberd
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 3
# Default-Stop: 0 1 2 6
# Description: Start the Jabberd daemon and components
### END INIT INFO
. /etc/rc.status
. /etc/rc.config
# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
# rc_status check and set local and overall rc status
# rc_status -v ditto but be verbose in local rc status
# rc_status -v -r ditto and clear the local rc status
# rc_failed set local and overall rc status to failed
# rc_reset clear local rc status (overall remains)
# rc_exit exit appropriate to overall rc status
# To disable a service, remove it's entry from the list below.
SERVICES="jabber msn yahoo aim muc jud chatbot proxy65"
# needed to start chatbot
PWD=$(pwd)
# jabberd binary location
JABBERD=/usr/local/jabber/jabberd/jabberd
# jabber.xml location
JABBERXML=/usr/local/jabber/jabber.xml
# transport xml config locations
MSNXML=/usr/local/jabber/msn/msn.xml
AIMXML=/usr/local/jabber/aim/aim.xml
YAHOOXML=/usr/local/jabber/yahoo/yahoo.xml
# muc.xml location
MUCXML=/usr/local/jabber/muc/muc.xml
# chatbot location
CHATBOTDIR=/usr/local/jabber/chatbot
CHATBOTXML=/usr/local/jabber/chatbot/config.xml
# user-agent location (using user-agent.jabberstudio.org, not using jud-ansi)
USERSAGENTDIR=/usr/local/jabber/users-agent
# proxy65 stuff
TWISTD=/usr/bin/twistd
# proxy65 .tap location
PROXYTAP=/usr/local/jabber/proxy65.tap
# pid storage
PIDDIR=/var/run/jabber
rc_reset
jabber(){
echo -n "Starting jabber daemon server: jabberd"
startproc -f $JABBERD -c $JABBERXML &>/dev/null
rc_status -v
}
stop_proc(){
case "$NAME" in
proxy65)
ps ax |grep twistd |grep $NAME &>/dev/null
if [ "$?" -eq 0 ]; then
kill -9 `cat $PIDDIR/$NAME.pid`
rm -f $PIDDIR/$NAME.pid
else
echo
echo -n "($NAME is not running)"
rm -f $PIDDIR/$NAME.pid
fi
;;
chatbot)
ps ax |grep perl |grep chatbot &>/dev/null
if [ "$?" -eq 0 ]; then
kill -9 `ps ax |grep perl |grep chatbot |grep -v grep |awk '{ print $1 }'` &>/dev/null
rm -f $PIDDIR/$NAME.pid
else
echo
echo -n "($NAME is not running)"
rm -f $PIDDIR/$NAME.pid
fi
;;
jud)
ps ax |grep perl |grep users-agent &>/dev/null
if [ "$?" -eq 0 ]; then
kill -9 `ps ax |grep perl |grep users-agent |grep -v grep |awk '{ print $1 }'` &>/dev/null
rm -f $PIDDIR/$NAME.pid
else
echo
echo -n "($NAME is not running)"
rm -f $PIDDIR/$NAME.pid
fi
;;
*)
# Handle all regular jabber children with one case statement
ps ax |grep jabberd |grep $NAME.xml &>/dev/null
if [ "$?" -eq 0 ]; then
kill -9 `ps ax |grep jabberd |grep $NAME.xml |grep -v grep |awk '{ print $1 }'` &>/dev/null
rm -f $PIDDIR/$NAME.pid
else
echo
echo -n "($NAME is not running)"
rm -f $PIDDIR/$NAME.pid
fi
;;
esac
}
yahoo(){
echo -n "Starting Yahoo! Transport: yahoo-t"
startproc -f $JABBERD -c $YAHOOXML &>/dev/null
rc_status -v
}
aim(){
echo -n "Starting AIM Transport: AIM-t"
startproc -f $JABBERD -c $AIMXML &>/dev/null
rc_status -v
}
msn(){
echo -n "Starting MSN Transport: MSN-t"
startproc -f $JABBERD -c $MSNXML &>/dev/null
rc_status -v
}
muc(){
echo -n "Starting Multi-User Conferencing: muc"
startproc -f $JABBERD -c $MUCXML &>/dev/null
rc_status -v
}
proxy65(){
echo -n "Starting Jabber File Transfer Service: proxy65"
startproc -f $TWISTD -q -f $PROXYTAP --pidfile $PIDDIR/proxy65.pid --logfile=/usr/local/jabber/proxy65/proxy65.log &>/dev/null
# python and perl scripts generate weird exit/status codes; I fool myself here that everything is ok.
rc_reset
rc_status -v
}
chatbot(){
echo -n "Starting Chatbot Service: chatbot"
cd $CHATBOTDIR
$CHATBOTDIR/chatbot --config=$CHATBOTXML &>/dev/null &
# python and perl scripts generate weird exit/status codes; I fool myself here that everything is ok.
rc_reset
rc_status -v
cd $PWD
}
jud(){
echo -n "Starting Jabber User Directory"
startproc -f $USERSAGENTDIR/users-agent &>/dev/null
# python and perl scripts generate weird exit/status codes; I fool myself here that everything is ok.
rc_reset
rc_status -v
}
# To disable a service, remove it's entry from the $SERVICES variable below.
SERVICES="jabber msn yahoo aim muc jud chatbot proxy65"
case "$1" in
start)
for each in $SERVICES;
do
$each
done
;;
stop)
echo -n "Stopping jabber daemon server: jabberd"
for each in $SERVICES;
do
NAME=$each
stop_proc
done
rc_status -v
;;
restart)
$0 stop
$0 start
;;
msnkick)
NAME=msn
echo -n "Stopping MSN Transport: MSN-t"
stop_proc
rc_status -v
msn
;;
aimkick)
NAME=aim
echo -n "Stopping AIM Transport: AIM-t"
stop_proc
rc_status -v
aim
;;
muckick)
NAME=muc
echo -n "Stopping Multi-User Conferencing: muc"
stop_proc
rc_status -v
muc
;;
judkick)
NAME=jud
echo -n "Stopping Jabber User Directory"
stop_proc
rc_status -v
jud
;;
yahookick)
NAME=yahoo
echo -n "Stopping Yahoo! Transport: yahoo-t"
stop_proc
rc_status -v
yahoo
;;
proxykick)
NAME=proxy65
echo -n "Restarting Jabber File Transfer Service: proxy65"
stop_proc
rc_status -v
proxy65
;;
botkick)
NAME=chatbot
echo -n "Restarting jabber help chatbot: chatbot"
stop_proc
rc_status -v
chatbot
;;
*)
echo "Usage: /etc/init.d/jabberd {start|stop|restart|msnkick|aimkick|yahookick|muckick|judkick|proxykick|botkick}"
exit 1
;;
esac
rc_exit