Rev | Line | |
---|
[1] | 1 | #!/sbin/runscript
|
---|
| 2 |
|
---|
| 3 | opts="depend start stop reload"
|
---|
| 4 |
|
---|
| 5 | depend() {
|
---|
| 6 | need clock hostname logger
|
---|
| 7 | }
|
---|
| 8 |
|
---|
| 9 | start() {
|
---|
| 10 | ebegin "Starting @install_name@"
|
---|
| 11 | /sbin/start-stop-daemon --start --quiet --exec @sbindir@/@install_name@
|
---|
| 12 | eend $?
|
---|
| 13 | }
|
---|
| 14 |
|
---|
| 15 | stop() {
|
---|
| 16 | ebegin "Stopping @install_name@"
|
---|
| 17 | /sbin/start-stop-daemon --stop --quiet --retry 15 --exec @sbindir@/@install_name@
|
---|
| 18 | rm -f @mylockfile@
|
---|
| 19 | eend $?
|
---|
| 20 | }
|
---|
| 21 |
|
---|
| 22 | reload() {
|
---|
| 23 | if [ ! -f @mylockfile@ ]; then
|
---|
| 24 | eerror "@install_name@ isn't running"
|
---|
| 25 | return 1
|
---|
| 26 | fi
|
---|
| 27 | ebegin "Reloading configuration"
|
---|
| 28 | kill -HUP `cat @mylockfile@` &>/dev/null
|
---|
| 29 | eend $?
|
---|
| 30 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.