First commit

This commit is contained in:
adri
2017-12-13 08:32:32 +01:00
commit 17b678f06b
7 changed files with 115 additions and 0 deletions

28
apache Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
if (( $EUID != 0 )); then
echo "Il faut les droit root pour executer la tache"
exit
fi
serviceName=apache2
case "$1" in
start)
echo "démarage d'$serviceName"
action=start
;;
stop)
echo "arrêt de $serviceName"
action=stop
;;
reload)
echo "Reload de $serviceName"
action=reload
;;
*)
echo "erreur $1 non reconnu"
exit 1
;;
esac
service $serviceName $action