Last change
on this file since 1204 was
1198,
checked in by price, 16 years ago
|
fix old bug in invirt-console-host initscript
Also simplify initscript dramatically, like our other good initscripts.
|
-
Property svn:executable set to
*
|
File size:
945 bytes
|
Rev | Line | |
---|
[815] | 1 | #! /bin/sh |
---|
| 2 | ### BEGIN INIT INFO |
---|
[1187] | 3 | # Provides: invirt-console-host |
---|
[815] | 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 |
---|
[1198] | 8 | # Short-Description: conserver config from invirt-config for Invirt host |
---|
[815] | 9 | # Description: |
---|
| 10 | ### END INIT INFO |
---|
| 11 | |
---|
[1198] | 12 | PACKAGE=invirt-console-host |
---|
| 13 | PARENTPACKAGE=conserver-server |
---|
[815] | 14 | |
---|
[1198] | 15 | dpkg -s "$PACKAGE" >/dev/null 2>/dev/null || exit 0 |
---|
[815] | 16 | |
---|
| 17 | . /lib/init/vars.sh |
---|
| 18 | . /lib/lsb/init-functions |
---|
| 19 | |
---|
| 20 | gen_config() |
---|
| 21 | { |
---|
[889] | 22 | for i in /etc/conserver/invirt-genconfig.cf |
---|
| 23 | do mako-render $i.mako > $i |
---|
| 24 | done |
---|
[815] | 25 | } |
---|
| 26 | |
---|
| 27 | case "$1" in |
---|
[1198] | 28 | start|reload|force-reload|restart) |
---|
| 29 | log_begin_msg "Reloading config for $PACKAGE" |
---|
| 30 | gen_config |
---|
| 31 | log_end_msg $? |
---|
| 32 | /etc/init.d/"$PARENTPACKAGE" "$1" |
---|
| 33 | ;; |
---|
[815] | 34 | stop) |
---|
[1198] | 35 | /etc/init.d/"$PARENTPACKAGE" "$1" |
---|
| 36 | ;; |
---|
[815] | 37 | *) |
---|
[1198] | 38 | log_success_msg "Usage: /etc/init.d/$PACKAGE {start|reload|force-reload|restart|stop}" |
---|
| 39 | ;; |
---|
[815] | 40 | esac |
---|
Note: See
TracBrowser
for help on using the repository browser.