cosmetic
[sfa.git] / init.d / sfa
index bde199d..ac77312 100755 (executable)
@@ -160,7 +160,7 @@ function db_start () {
     # only if enabled
     [ "$SFA_DB_ENABLED" == 1 -o "$SFA_DB_ENABLED" == True ] || return
 
-    if ! rpm -q myplc >& /dev/null; then
+    if [ ! -f /etc/myplc-release ] ; then
 
        ######## standalone deployment - no colocated myplc
 
@@ -266,7 +266,7 @@ function db_start () {
        check
     fi
     check
-    # mention sfaadmin.py instead of just sfaadmin for people who do not install through rpm
+    # mention sfaadmin.py instead of just sfaadmin for safety
     sfaadmin.py reg sync_db
 
     MESSAGE=$"SFA: Checking for PostgreSQL server"
@@ -281,7 +281,7 @@ function db_stop () {
     [ "$SFA_DB_ENABLED" == 1 -o "$SFA_DB_ENABLED" == True ] || return
 
     # not too nice, but.. when co-located with myplc we'll let it start/stop postgresql
-    if ! rpm -q myplc >& /dev/null ; then
+    if [ ! -f /etc/myplc-release ] ; then
        service postgresql stop >& /dev/null
        check
        MESSAGE=$"Stopping PostgreSQL server"