1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
#!/bin/bash apsq_start() { echo "Arrancando Apache" /etc/init.d/apache start echo "Arrancando MySQL" /etc/init.d/mysql start } apsq_stop() { echo "Parando Apache" /etc/init.d/apache stop echo "Parando MySQL" /etc/init.d/mysql stop } apsq_restart() { apsq_stop apsq_start } case "$1" in 'start') apsq_start ;; 'stop') apsq_stop ;; 'restart') apsq_stop apsq_start ;; *) echo "Uso: $0 start|stop|restart" esac |