[UPDATE] - init.d
This commit is contained in:
parent
86011bbacf
commit
5718426164
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: monithor-server
|
title: monithor-client
|
||||||
section: 1
|
section: 1
|
||||||
author: Guillaume Astier Ruiz
|
author: Guillaume Astier Ruiz
|
||||||
date: 20220320
|
date: 20220320
|
||||||
|
|||||||
@ -7,9 +7,9 @@ date: 20220320
|
|||||||
|
|
||||||
# SYNOPSIS
|
# SYNOPSIS
|
||||||
|
|
||||||
`/usr/local/bin/monithor-server [start/stop]`
|
`/usr/local/bin/monithor-d [start/stop]`
|
||||||
|
|
||||||
`/etc/init.d/monithor-c [start/stop]`
|
`/etc/init.d/monithor-d [start/stop]`
|
||||||
|
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
@ -26,11 +26,11 @@ le service peut être démarré et arrêté via system V
|
|||||||
|
|
||||||
- Démarrage
|
- Démarrage
|
||||||
|
|
||||||
`/etc/init.d/monithor-c start`
|
`/etc/init.d/monithor-d start`
|
||||||
|
|
||||||
- Arrêt
|
- Arrêt
|
||||||
|
|
||||||
`/etc/init.d/monithor-c start`
|
`/etc/init.d/monithor-d start`
|
||||||
|
|
||||||
# CONFIGURATION SERVICE
|
# CONFIGURATION SERVICE
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
# Provides: monithor-c
|
# Provides: monithor-c
|
||||||
# Default-Start: 2 3 4 5
|
# Default-Start: 2 3 4 5
|
||||||
# Default-Stop:
|
# Default-Stop:
|
||||||
# Short-Description: MoniThor Server
|
# Short-Description: MoniThor client
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
@ -21,15 +21,20 @@ case "$1" in
|
|||||||
logger "monithor-client is running ..."
|
logger "monithor-client is running ..."
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
logger "Starting MoniThor Server"
|
logger "Starting MoniThor client "
|
||||||
/usr/local/bin/monithor-client start
|
/usr/local/bin/monithor-client start
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
logger "Stoping MoniThor server" "monithor-c" || true
|
logger "Stoping MoniThor client " "monithor-c" || true
|
||||||
/usr/local/bin/monithor-client stop
|
/usr/local/bin/monithor-client stop
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
status)
|
||||||
|
logger "status MoniThor client " "monithor-c" || true
|
||||||
|
[ $(ps axf| grep MoniThor | grep SCREEN | wc -l) -gt 1 ] && echo "monithor-c is running" || echo "montihor-c is dead"
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "Usage: /etc/init.d/monithor-c {start|stop|status}" || true
|
echo "Usage: /etc/init.d/monithor-c {start|stop|status}" || true
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@ -30,6 +30,12 @@ case "$1" in
|
|||||||
/usr/local/bin/monithor-server stop
|
/usr/local/bin/monithor-server stop
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
status)
|
||||||
|
logger "status MoniThor server" "monithor-d" || true
|
||||||
|
[ $(ps axf| grep /usr/local/bin/monithor-server|grep -v grep) ] && echo "monithor-d is running" || echo "montihor-d is dead"
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "Usage: /etc/init.d/monithor-d {start|stop|status}" || true
|
echo "Usage: /etc/init.d/monithor-d {start|stop|status}" || true
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user