Subversion Repositories eFlore/Applications.cel

Rev

Blame | Last modification | View Log | RSS feed

#!/bin/sh
#/etc/rc.d/init.d/
# 
# Aurélien PERONNET [17 avril 2013]
# Service de lancement des scripts de maintenance et modification du cel
#
case "$1" in

start)

echo "Demarrage de codeinseecommune :"
nohup /usr/local/sbin/codeinseecommune.sh 1>/dev/null 2>/dev/null &

;;

stop)

echo "Arret de codeinseecommune"
PID=`ps -eaf | grep codeinseecommune | grep -v grep | tr -s ' ' | cut -d' ' -f2 | head -n1`
kill -9 ${PID}

;;

status)

echo -n "Voici les PID du processus codeinseecommune :"
PID=`ps -eaf | grep codeinseecommune | grep -v grep | tr -s ' ' | cut -d' ' -f2 | head -n1`
echo ${PID}

;;


*)

echo "Usage:  {start|stop|status}"

exit 1

;;

esac