You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
628 B
Bash
36 lines
628 B
Bash
#!/bin/sh
|
|
|
|
do_stop() {
|
|
service nagios stop
|
|
service npcd stop
|
|
service ndo2db stop
|
|
service mysqld stop
|
|
service postgresql stop
|
|
service httpd stop
|
|
service crond stop
|
|
}
|
|
|
|
do_start() {
|
|
service crond start
|
|
service httpd start
|
|
service postgresql start
|
|
service mysqld start
|
|
service ndo2db start
|
|
service npcd start
|
|
service nagios start
|
|
}
|
|
|
|
do_restart() {
|
|
do_stop
|
|
do_start
|
|
}
|
|
|
|
while [ -n "$1" ]; do
|
|
case "$1" in
|
|
--stop) do_stop; exit;;
|
|
--start) do_start; exit;;
|
|
--restart) do_restart; exit;;
|
|
*) echo "Usage: $0 (--stop | --start | --restart)"; exit;;
|
|
esac
|
|
done
|