Last change
on this file since 2446 was
2436,
checked in by broder, 15 years ago
|
In invirt-remote:
- Instead of running all of the disk-wiping dds simultaneously, run them
sequentially using a janitor daemon (LP: #411486).
|
-
Property svn:executable set to
*
|
File size:
1.2 KB
|
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 | reload_cfg() |
---|
24 | { |
---|
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 | } |
---|
30 | |
---|
31 | case "$1" in |
---|
32 | start) |
---|
33 | reload_cfg |
---|
34 | |
---|
35 | log_begin_msg "Starting the invirt-janitor for $PACKAGE" |
---|
36 | daemon -n invirt-janitor -r invirt-janitor |
---|
37 | log_end_msg $? |
---|
38 | ;; |
---|
39 | force-reload|restart) |
---|
40 | reload_cfg |
---|
41 | |
---|
42 | log_begin_msg "Restarting the invirt-janitor for $PACKAGE" |
---|
43 | daemon -n invirt-janitor --restart |
---|
44 | log_end_msg $? |
---|
45 | ;; |
---|
46 | stop) |
---|
47 | log_begin_msg "Stopping the invirt-janitor for $PACKAGE" |
---|
48 | daemon -n invirt-janitor --stop |
---|
49 | log_end_msg $? |
---|
50 | ;; |
---|
51 | *) |
---|
52 | log_success_msg "Usage: /etc/init.d/$PACKAGE {start|force-reload|restart|stop}" |
---|
53 | ;; |
---|
54 | esac |
---|
Note: See
TracBrowser
for help on using the repository browser.