Subversion Repositories eFlore/Applications.cel

Rev

Rev 1544 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1544 aurelien 1
#!/bin/sh
2
#/etc/rc.d/init.d/
3
#
4
# Aurélien PERONNET [17 avril 2013]
5
# Service de lancement des scripts de maintenance et modification du cel
6
#
7
case "$1" in
8
 
9
start)
10
 
11
echo "Demarrage de codeinseecommune :"
12
nohup /usr/local/sbin/codeinseecommune.sh 1>/dev/null 2>/dev/null &
13
 
14
;;
15
 
16
stop)
17
 
18
echo "Arret de codeinseecommune"
19
PID=`ps -eaf | grep codeinseecommune | grep -v grep | tr -s ' ' | cut -d' ' -f2 | head -n1`
20
kill -9 ${PID}
21
 
22
;;
23
 
24
status)
25
 
26
echo -n "Voici les PID du processus codeinseecommune :"
27
PID=`ps -eaf | grep codeinseecommune | grep -v grep | tr -s ' ' | cut -d' ' -f2 | head -n1`
28
echo ${PID}
29
 
30
;;
31
 
32
 
33
*)
34
 
35
echo "Usage:  {start|stop|status}"
36
 
37
exit 1
38
 
39
;;
40
 
41
esac