service_restart.sh 192 B

123456
  1. #!/bin/bash
  2. for svc in $(rc-status --crashed); do
  3. rc-service $svc -- --nodeps restart
  4. echo "$svc has crashed and has been restarted." | mail -s "$svc has been restarted." <your_email>
  5. done