Michael van Elst il y a 22 ans
Parent
commit
f4f8abdf2b
2 fichiers modifiés avec 10 ajouts et 1 suppressions
  1. 1 1
      postgresql/postgresql.spec
  2. 9 0
      postgresql/rc.postgresql

+ 1 - 1
postgresql/postgresql.spec

@@ -40,7 +40,7 @@ Distribution: OpenPKG [BASE]
 Group:        Database
 License:      GPL
 Version:      %{V_postgresql}
-Release:      20030717
+Release:      20030718
 
 #   package options
 %option       with_cxx      no

+ 9 - 0
postgresql/rc.postgresql

@@ -21,6 +21,15 @@
     postgresql_opts="-i -h $postgresql_socket_inet -k $postgresql_socket_unix"
     postgresql_opts="$postgresql_opts $postgresql_flags"
 
+%status -p 200 -u @l_rusr@ -o
+    postgresql_usable="unknown"
+    postgresql_active="no"
+    opService postgresql enable yes && \
+        @l_prefix@/bin/pg_ctl status -D $postgresql_datadir >/dev/null && postgresql_active="yes"
+    echo "postgresql_enable=\"$postgresql_enable\""
+    echo "postgresql_usable=\"$postgresql_usable\""
+    echo "postgresql_active=\"$postgresql_active\""
+
 %start -p 200 -u @l_rusr@
     opService postgresql enable yes || exit 0
     @l_prefix@/bin/pg_ctl start -l $postgresql_log_file -D $postgresql_datadir -o "$postgresql_opts"