Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 503acdd23b |
24
script.sh
Executable file
24
script.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#! /bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
test $# -ne 2 && { echo "Usage: $0 start|stop|restart service" ; exit 42 ; }
|
||||
|
||||
case $1 in
|
||||
(start)
|
||||
echo "starting $2"
|
||||
;;
|
||||
(stop)
|
||||
echo "stopping $2"
|
||||
;;
|
||||
(restart)
|
||||
# ne marche que si le script est exécutable
|
||||
$0 stop $2
|
||||
$0 start $2
|
||||
;;
|
||||
(*)
|
||||
echo "action inconnue"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user