Paolo Gabrielli\’s Blog

Just another near empty WordPress.com’s weblog. But this is from Paolo ‘pkirk’ Gabrielli.

Monit SimpServer and startup script CentOS/RH

Posted by paolo on 9 October, 2009

# Simpserver: (MSN/IM Encryption server)
# ————————

check process simpserver with pidfile /var/run/simpserver.pid
start program = “/etc/init.d/simpserver start”
stop program = “/etc/init.d/simpserver stop”
if 5 restarts within 5 cycles then timeout

#!/bin/sh
#
# Startup script for simpserver
#
# description: simpserver is a socks proxy to encrypt IM/MSN/ICQ conversation
# processname: simpserver

# Source function library.
. /etc/rc.d/init.d/functions

SIMPSERVER=/usr/local/simp/bin/simpserver
PIDFILE=/var/run/simpserver.pid

# See how we were called.
case “$1” in
start)
echo -n “Starting Simpserver: ”
sudo -u simpuser nohup $SIMPSERVER &
echo
pidof simpserver > $PIDFILE
touch /var/lock/subsys/simpserver
;;
stop)
echo -n “Shutting down simpserver: ”
killproc simpserver
echo
rm -f $PIDFILE
rm -f /var/lock/subsys/simpserver
;;
status)
status simpserver
;;
restart)
$0 stop
$0 start
;;
*)
echo “Usage: $0 {start|stop|restart|status}”
exit 1
esac

exit 0

Leave a comment