1745 |
jpm |
1 |
#!/bin/sh
|
|
|
2 |
|
|
|
3 |
### BEGIN INIT INFO
|
|
|
4 |
# Provides: tb_del
|
|
|
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 et emails DEL
|
|
|
12 |
# Description: Start/stop les scripts de maintenance et d'envoie d'emails de DEL.
|
|
|
13 |
### END INIT INFO
|
|
|
14 |
|
1867 |
jpm |
15 |
#/etc/init.d/
|
|
|
16 |
#
|
|
|
17 |
# Aurélien Peronnet [7 avril 2011]
|
|
|
18 |
# Service de lancement des scripts DEL
|
1745 |
jpm |
19 |
#
|
|
|
20 |
case "$1" in
|
|
|
21 |
|
|
|
22 |
start)
|
|
|
23 |
|
|
|
24 |
echo "Demarrage de del_mail_recapitulatif_obs :"
|
|
|
25 |
nohup /usr/local/sbin/del_mail_recapitulatif_obs 1>/dev/null 2>/dev/null &
|
|
|
26 |
|
|
|
27 |
echo "Demarrage de del_mail_recapitulatif_commentaires :"
|
|
|
28 |
nohup /usr/local/sbin/del_mail_recapitulatif_commentaires 1>/dev/null 2>/dev/null &
|
|
|
29 |
|
|
|
30 |
;;
|
|
|
31 |
|
|
|
32 |
stop)
|
|
|
33 |
|
|
|
34 |
echo "Arret de del_mail_recapitulatif_obs"
|
|
|
35 |
PID=`ps -eaf | grep del_mail_recapitulatif_obs | grep -v grep | tr -s ' ' | cut -d' ' -f2 | head -n1`
|
|
|
36 |
kill -9 ${PID}
|
|
|
37 |
|
|
|
38 |
echo "Arret de del_mail_recapitulatif_commentaires"
|
|
|
39 |
PID=`ps -eaf | grep del_mail_recapitulatif_commentaires | grep -v grep | tr -s ' ' | cut -d' ' -f2 | head -n1`
|
|
|
40 |
kill -9 ${PID}
|
|
|
41 |
|
|
|
42 |
;;
|
|
|
43 |
|
|
|
44 |
status)
|
|
|
45 |
|
|
|
46 |
echo -n "Voici les PID du processus del_mail_recapitulatif_obs :"
|
|
|
47 |
PID=`ps -eaf | grep del_mail_recapitulatif_obs | grep -v grep | tr -s ' ' | cut -d' ' -f2 | head -n1`
|
|
|
48 |
echo ${PID}
|
|
|
49 |
|
|
|
50 |
echo -n "Voici les PID du processus del_mail_recapitulatif_commentaires :"
|
|
|
51 |
PID=`ps -eaf | grep del_mail_recapitulatif_commentaires | grep -v grep | tr -s ' ' | cut -d' ' -f2 | head -n1`
|
|
|
52 |
echo ${PID}
|
|
|
53 |
|
|
|
54 |
;;
|
|
|
55 |
|
|
|
56 |
|
|
|
57 |
*)
|
|
|
58 |
|
|
|
59 |
echo "Usage: {start|stop|status}"
|
|
|
60 |
|
|
|
61 |
exit 1
|
|
|
62 |
|
|
|
63 |
;;
|
|
|
64 |
|
|
|
65 |
esac
|