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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: