1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| #! /bin/sh
### BEGIN INIT INFO
#Provides: demarrage process
#Required-Start: $all $checkroot
#Required-Stop:
#Should-Start:
#Should-Stop:
#Default-Start: 2
#Default-Stop: 0
#X-Start-Before:
#X-Stop-After:
#X-Interactive:
#Short-Description: Lancement application process
#Description: Initialise IP du process et lancement de xeno_process
### END INIT INFO
# configuration de l'adresse ip du pc process
# media eth0 et mask
ifconfig eth0 168.65.159.158 netmask 255.255.255.192
DAEMON=/root/process/xeno_process_vanilla
# test si l'appli est un executable
test -x $DAEMON || exit 0
case "$1" in
start)
ifconfig eth0 168.65.159.158 netmask 255.255.255.192
cd /root/process
sleep 10
./xeno_process_vanilla
;;
stop)
sleep 2
shutdown -h now
;;
*)
exit 1
;;
esac
exit 0 |