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