Changeset 989 for trunk/packages


Ignore:
Timestamp:
Oct 1, 2008, 7:31:23 PM (16 years ago)
Author:
price
Message:

sipb-xen-database-server: fix init script, expand pg_hba.conf

Location:
trunk/packages/sipb-xen-database
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-database/debian/changelog

    r976 r989  
     1sipb-xen-database (10.25) unstable; urgency=low
     2
     3  * add remote and console to pg_hba.conf template
     4  * fix init script so it works
     5
     6 -- Greg Price <price@mit.edu>  Wed, 01 Oct 2008 19:30:26 -0400
     7
    18sipb-xen-database (10.24) unstable; urgency=low
    29
  • trunk/packages/sipb-xen-database/debian/sipb-xen-database-server.init

    r974 r989  
    1010### END INIT INFO
    1111
    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
     12PACKAGE=sipb-xen-database-tables
    2413
    2514# Exit if the package is not installed
    26 [ -x "/usr/bin/sipb-xen-database-tabales" ] || exit 0
     15[ -x "/usr/bin/sipb-xen-database-tables" ] || exit 0
    2716
    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
    3217. /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.
    3618. /lib/lsb/init-functions
    3719
    3820gen_config()
    3921{
    40     for i in /etc/postgresql/8.3/main/pg_hba.conf
    41              ; do
    42         mako-render $i.mako > $i
    43     done
    44 }
    45 
    46 do_reload()
    47 {
    48         gen_config
    49 
     22  for i in /etc/postgresql/8.3/main/pg_hba.conf
     23  do mako-render $i.mako > $i
     24  done
    5025}
    5126
    5227case "$1" in
    53   start)
    54         [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
    55 gen_config
    56         ;;
     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/postgresql-8.3 "$1"
     33    ;;
    5734  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         ;;
     35    ;;
    7136  *)
    72         echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
    73         exit 3
    74         ;;
     37    log_success_msg "Usage: /etc/init.d/$PACKAGE {start|reload|force-reload|restart|stop}"
     38    ;;
    7539esac
    76 
    77 :
  • trunk/packages/sipb-xen-database/server/etc/postgresql/8.3/main/pg_hba.conf.mako

    r918 r989  
    8383# IPv6 local connections:
    8484host    all         all         ::1/128               md5
    85 host    ${cfg.db.dbname}        ${cfg.db.user}  ${cfg.db.ip}/32 trust
    86 % for h in cfg.hosts:
    87 host    ${cfg.db.dbname}        ${cfg.db.user}  ${h.ip}/32      trust
     85% for m in cfg.hosts + [cfg.db, cfg.remote, cfg.console]:
     86host    ${cfg.db.dbname}        ${cfg.db.user}  ${m.ip}/32      trust
    8887% endfor
Note: See TracChangeset for help on using the changeset viewer.