Last change
on this file since 927 was
918,
checked in by hartmans, 16 years ago
|
Generate pg_hba.conf and install postgresql.conf
so that installing this package works without manual editing
|
File size:
1.5 KB
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | ### BEGIN INIT INFO |
---|
3 | # Provides: sipb-xen-console |
---|
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: sipb-xen Console Server homedir filesystem |
---|
9 | # Description: |
---|
10 | ### END INIT INFO |
---|
11 | |
---|
12 | # Author: SIPB Xen Project <sipb-xen@mit.edu> |
---|
13 | |
---|
14 | # Do NOT "set -e" |
---|
15 | |
---|
16 | # PATH should only include /usr/* if it runs after the mountnfs.sh script |
---|
17 | PATH=/sbin:/usr/sbin:/bin:/usr/bin |
---|
18 | DESC="The sipb-xen database server" |
---|
19 | NAME=sipb-xen-database-server |
---|
20 | |
---|
21 | |
---|
22 | |
---|
23 | SCRIPTNAME=/etc/init.d/$NAME |
---|
24 | |
---|
25 | # Exit if the package is not installed |
---|
26 | [ -x "/usr/bin/sipb-xen-database-tabales" ] || exit 0 |
---|
27 | |
---|
28 | # Read configuration variable file if it is present |
---|
29 | [ -r /etc/default/$NAME ] && . /etc/default/$NAME |
---|
30 | |
---|
31 | # Load the VERBOSE setting and other rcS variables |
---|
32 | . /lib/init/vars.sh |
---|
33 | |
---|
34 | # Define LSB log_* functions. |
---|
35 | # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. |
---|
36 | . /lib/lsb/init-functions |
---|
37 | |
---|
38 | gen_config() |
---|
39 | { |
---|
40 | for i in /etc/postgresql/8.1/main/pg_hba.conf |
---|
41 | ; do |
---|
42 | mako-render $i.mako > $i |
---|
43 | done |
---|
44 | } |
---|
45 | |
---|
46 | do_reload() |
---|
47 | { |
---|
48 | gen_config |
---|
49 | |
---|
50 | } |
---|
51 | |
---|
52 | case "$1" in |
---|
53 | start) |
---|
54 | [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" |
---|
55 | gen_config |
---|
56 | ;; |
---|
57 | stop) |
---|
58 | ;; |
---|
59 | reload|force-reload) |
---|
60 | log_daemon_msg "Reloading $DESC" "$NAME" |
---|
61 | do_reload |
---|
62 | log_end_msg $? |
---|
63 | ;; |
---|
64 | restart) |
---|
65 | *) |
---|
66 | # Failed to stop |
---|
67 | log_end_msg 1 |
---|
68 | ;; |
---|
69 | esac |
---|
70 | ;; |
---|
71 | *) |
---|
72 | echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 |
---|
73 | exit 3 |
---|
74 | ;; |
---|
75 | esac |
---|
76 | |
---|
77 | : |
---|
Note: See
TracBrowser
for help on using the repository browser.