
Io uno sguardo ce l'ho dato, e se non erro è lo script che ti permette di scrivere in console service nome_servizio restart|stop|start per riavviare|fermare|avviare un servizio.
Se non è lui, ha la sintassi uguale
:
Codice:
usage () {
echo 'usage : '
echo ' service ['service'|active|inactive|?] [+|-][start|stop|restart]'
echo ''
echo ' where 'service' can be the name of a service'
echo ''
echo ' active : list all actives services on boot'
echo ' inactive : list all inactives services on boot'
echo ' ? : display this help information'
echo ' + : after stopping/starting a service, activate it for auto start at boot time'
echo ' - : after stopping/starting a service, unactivate its auto start at boot time'
echo ' start : start a service'
echo ' stop : stop a service'
echo ' restart : restart a service'
echo ''
echo ' with just a service name, the command prints if the service is active at boot time or not.'
echo ' without any argument, the command prints the list of all inactive and actives services.'
e io l'ho utilizzato per riavviare apache in caso fallisce la wget:
Codice:
else
ERRLOG_MSG="`date +%T` `date +%D` - [errore]: wget su localhost fallito... tentativo di riavvio di httpd"
echo
echo $ERRLOG_MSG
echo $ERRLOG_MSG >> $LOG_FILE
service httpd restart
echo
fi
Segnalibri