Ignore:
Timestamp:
Aug 16, 2007, 4:45:48 PM (17 years ago)
Author:
nelhage
Message:

A new version with less broken init scripts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-database/sipb-xen-database/debian/sipb-xen-database-server.postinst

    r77 r81  
    2424        su postgres -c 'createuser sipb-xen -S -d -R'    || true
    2525        su postgres -c 'createdb sipb_xen -O sipb-xen'   || true
    26         PG_HBA=/etc/postgresql/8.1/main/pg_hba.conf
    27         perl -ni -e 'print unless /^# ===BEGIN ADDED BY sipb-xen-dabase server$/ ..
    28                                   /^# ===END ADDED BY sipb-xen-dabase server$/' \
    29                                   "$PG_HBA"
    30         cat<<EOF >> "$PG_HBA"
    31 # ===BEGIN ADDED BY sipb-xen-dabase server
    32 # DO NOT EDIT
    33 host    sipb_xen    sipb-xen    127.0.0.1/32          trust
    34 local   sipb_xen    sipb-xen                          trust
    35 # ===END ADDED BY sipb-xen-dabase server
    36 EOF
     26        adduser --system sipb-xen
    3727
    38         if hash invoke-rc.d; then
    39             invoke-rc.d postgresql-8.1 restart
    40         else
    41             /etc/init.d/postgresql-8.1 restart
    42         fi
    43 
    44         sipb-xen-database-tables create
     28        su sipb-xen -s /bin/sh -c 'sipb-xen-database-tables create'
    4529    ;;
    4630
Note: See TracChangeset for help on using the changeset viewer.