source:
npl/commonservers/daemontools/svcrestart
@
c403a2d
Last change on this file since c403a2d was c5c522c, checked in by , 8 years ago | |
---|---|
|
|
File size: 174 bytes |
Rev | Line | |
---|---|---|
[c5c522c] | 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.