Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision Les deux révisions suivantes
etherpad [Le 29/01/2018, 15:33]
L'Africain lien intra wiki
etherpad [Le 16/03/2018, 15:50]
kholo [Démarrage]
Ligne 79: Ligne 79:
 . /​lib/​lsb/​init-functions . /​lib/​lsb/​init-functions
 start() { start() {
-echo "​Starting $DESC... " + echo "​Starting $DESC... " 
-start-stop-daemon --start --chuid "​$USER:​$GROUP"​ --background --make-pidfile --pidfile /​var/​run/​$NAME.pid --exec "​$EPLITE_DIR/​$EPLITE_BIN"​ -- $LOGFILE || true + start-stop-daemon --start --chuid "​$USER:​$GROUP"​ --background --make-pidfile --pidfile /​var/​run/​$NAME.pid --exec "​$EPLITE_DIR/​$EPLITE_BIN"​ -- $LOGFILE || true 
-echo "​done"​+ echo "​done"​
 } }
 # Nous avons besoin de cette fonction pour assurer la totalité du processus lorsqu'​il sera tué # Nous avons besoin de cette fonction pour assurer la totalité du processus lorsqu'​il sera tué
 killtree() { killtree() {
-local _pid=$1 + local _pid=$1 
-local _sig=${2-TERM} + local _sig=${2-TERM} 
-for _child in $(ps -o pid --no-headers --ppid ${_pid}); do + for _child in $(ps -o pid --no-headers --ppid ${_pid}); do 
-killtree ${_child} ${_sig} + killtree ${_child} ${_sig} 
-done + done 
-kill -${_sig} ${_pid}+ kill -${_sig} ${_pid}
 } }
 stop() { stop() {
-echo "​Stopping $DESC... " + echo "​Stopping $DESC... " 
-while test -d /proc/$(cat /​var/​run/​$NAME.pid);​ do + while test -d /proc/$(cat /​var/​run/​$NAME.pid);​ do 
-killtree $(cat /​var/​run/​$NAME.pid) 15 + killtree $(cat /​var/​run/​$NAME.pid) 15 
-sleep 0.5 + sleep 0.5 
-done + done 
-rm /​var/​run/​$NAME.pid + rm /​var/​run/​$NAME.pid 
-echo "​done"​+ echo "​done"​
 } }
 status() { status() {
-status_of_proc -p /​var/​run/​$NAME.pid ""​ "​etherpad-lite"​ && exit 0 || exit $?+ status_of_proc -p /​var/​run/​$NAME.pid ""​ "​etherpad-lite"​ && exit 0 || exit $?
 } }
 case "​$1"​ in case "​$1"​ in
-start) + start) start ;; 
-start + stop) stop ;; 
-;; + restart) stop start ;; 
-stop) + status) status ;; 
-stop + *) echo "​Usage:​ $NAME {start|stop|restart|status}"​ >&​2 
-;; + exit 1 ;;
-restart) +
-stop +
-start +
-;; +
-status) +
-status +
-;; +
-*) +
-echo "​Usage:​ $NAME {start|stop|restart|status}"​ >&​2 +
-exit 1 +
-;;+
 esac esac
-exit 0</​file>​+exit 0 
 +</​file>​
  
 Donnez les droits d’exécution au fichier précédemment créé : Donnez les droits d’exécution au fichier précédemment créé :
Ligne 131: Ligne 121:
 Activez-le : Activez-le :
  
-''​update-rc.d etherpad-lite default ​''​+  ​update-rc.d etherpad-lite default
  
 Démarrez Etherpad Lite en tant que service : Démarrez Etherpad Lite en tant que service :
  • etherpad.txt
  • Dernière modification: Le 31/08/2022, 23:37
  • par moths-art