Last change
on this file since 1669 was
1443,
checked in by broder, 16 years ago
|
Use invoke-rc.d instead of calling init scripts directly in
invirt-remote-host init script
|
-
Property svn:executable set to
*
|
File size:
817 bytes
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | ### BEGIN INIT INFO |
---|
3 | # Provides: invirt-remote-host |
---|
4 | # Required-Start: $local_fs $remote_fs |
---|
5 | # Required-Stop: $local_fs $remote_fs |
---|
6 | # Default-Start: 2 3 4 5 |
---|
7 | # Default-Stop: 0 1 6 |
---|
8 | # Short-Description: remctl configuration for an Invirt host |
---|
9 | # Description: |
---|
10 | ### END INIT INFO |
---|
11 | |
---|
12 | PACKAGE=invirt-remote-host |
---|
13 | |
---|
14 | . /lib/lsb/init-functions |
---|
15 | |
---|
16 | gen_config() |
---|
17 | { |
---|
18 | for i in /etc/remctl/acl/remote |
---|
19 | do mako-render $i.mako > $i |
---|
20 | done |
---|
21 | } |
---|
22 | |
---|
23 | case "$1" in |
---|
24 | start|reload|force-reload|restart) |
---|
25 | log_begin_msg "Reloading config for $PACKAGE" |
---|
26 | gen_config |
---|
27 | log_end_msg $? |
---|
28 | invoke-rc.d openbsd-inetd start # returns 1 if inetd is running |
---|
29 | [ $? -eq 1 ] && exit 0 |
---|
30 | ;; |
---|
31 | stop) |
---|
32 | ;; |
---|
33 | *) |
---|
34 | log_success_msg "Usage: /etc/init.d/$PACKAGE {start|reload|force-reload|restart|stop}" |
---|
35 | ;; |
---|
36 | esac |
---|
Note: See
TracBrowser
for help on using the repository browser.