From ff90ba219c5ff9a57c43ebf9b8c8cd69649644a2 Mon Sep 17 00:00:00 2001 From: kueller Date: Tue, 20 Apr 2010 18:36:35 +0000 Subject: [PATCH] Vorbereitung auf upstart git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_postgresql@5543 504e572c-2e33-0410-9681-be2bf7408885 --- etc/init/postgresql.conf | 15 +++++++++++++++ init/genpkg | 33 +++++++++++++++++---------------- 2 files changed, 32 insertions(+), 16 deletions(-) create mode 100644 etc/init/postgresql.conf diff --git a/etc/init/postgresql.conf b/etc/init/postgresql.conf new file mode 100644 index 0000000..d719869 --- /dev/null +++ b/etc/init/postgresql.conf @@ -0,0 +1,15 @@ +description "Startup MySQL DAtabase" +author "Harald Kueller " +version 1.0 +emits none special + +start on (runlevel [2345] and (started ifup)) +stop on runlevel [S016] + +console none + +script + source /etc/init/functions + source /etc/sysconfig/profile.d/PostgreSQL + su - postgres -c "/opt/PostgreSQL/bin/postmaster $PGNE -D $PGDATA" +end script diff --git a/init/genpkg b/init/genpkg index 638e21d..5c1b691 100644 --- a/init/genpkg +++ b/init/genpkg @@ -27,19 +27,20 @@ # # -WDIR=`pwd` -cd etc/init.d -chmod 755 postgresql -mkdir rc{0,1,2,3,4,5,6}.d -for i in 0 1 2 6; do - cd rc$i.d - ln -s ../postgresql K25postgresql - cd .. -done -for i in 3 4 5; do - cd rc$i.d - ln -s ../postgresql S25postgresql - cd .. -done -cd $WDIR - ~ +if [ -d /var/install/sysvinit* ]; then + WDIR=`pwd` + cd etc/init.d + chmod 755 postgresql + mkdir rc{0,1,2,3,4,5,6}.d + for i in 0 1 2 6; do + cd rc$i.d + ln -s ../postgresql K25postgresql + cd .. + done + for i in 3 4 5; do + cd rc$i.d + ln -s ../postgresql S25postgresql + cd .. + done + cd $WDIR +fi