source:
npl/commonservers/daemontools/svcrestart
@
c5c522c
Last change on this file since c5c522c was c5c522c, checked in by , 8 years ago | |
---|---|
|
|
File size: 174 bytes |
Line | |
---|---|
1 | #!/bin/bash |
2 | SERVICE=$1 |
3 | |
4 | #only restart it its up currently |
5 | if ! svstat $SERVICE | grep ': down' >/dev/null; then |
6 | svcstop $SERVICE || exit 1 |
7 | svcstart $SERVICE || exit 1 |
8 | fi |
9 | |
10 |
Note: See TracBrowser
for help on using the repository browser.