Subversion Repositories eFlore/Applications.cel

Rev

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

Rev Author Line No. Line
2416 jpm 1
#!/bin/sh
2
 
3
### BEGIN INIT INFO
4
# Provides:          tb_cel
5
# Required-Start:    $local_fs $remote_fs
6
# Required-Stop:     $local_fs $remote_fs
7
# Should-Start:      $all
8
# Should-Stop:       $all
9
# Default-Start:     2 3 4 5
10
# Default-Stop:      0 1 6
11
# Short-Description: Start/stop scripts maintenance CEL
12
# Description:       Start/stop les scripts de maintenance de CEL.
13
### END INIT INFO
14
 
15
#/etc/rc.d/init.d/
16
#
17
# Aurélien PERONNET [17 avril 2013]
18
# Service de lancement des scripts de maintenance du CEL
19
#
20
case "$1" in
21
 
22
start)
23
 
2417 jpm 24
echo "Demarrage de code_insee_commune :"
25
nohup /usr/local/sbin/code_insee_commune.sh 1>/dev/null 2>/dev/null &
2416 jpm 26
 
27
;;
28
 
29
stop)
30
 
2417 jpm 31
echo "Arret de code_insee_commune"
32
PID=`ps -eaf | grep code_insee_commune | grep -v grep | tr -s ' ' | cut -d' ' -f2 | head -n1`
2416 jpm 33
kill -9 ${PID}
34
 
35
;;
36
 
37
status)
38
 
2417 jpm 39
echo -n "Voici les PID du processus code_insee_commune :"
40
PID=`ps -eaf | grep code_insee_commune | grep -v grep | tr -s ' ' | cut -d' ' -f2 | head -n1`
2416 jpm 41
echo ${PID}
42
 
43
;;
44
 
45
 
46
*)
47
 
48
echo "Usage:  {start|stop|status}"
49
 
50
exit 1
51
 
52
;;
53
 
54
esac