]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Improving shell starting.sh
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Wed, 18 Jun 2025 13:01:30 +0000 (09:01 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Wed, 18 Jun 2025 13:01:30 +0000 (09:01 -0400)
mailleur.spec.in
support/starting.sh

index 902e2c6905a7eccf79eb134648831c131474555e..d17a9e12bba5560cbf394d63c53325624ed05c76 100644 (file)
@@ -150,7 +150,6 @@ if [ "$1" = 1 ]; then
   sed -i                                       \
        -e "s/DB_TO_BE_DEFINED/POSTGRES/"       \
        %{_sysconfdir}/%{name}/%{name}.conf
-  echo %{name}.conf updated?!
   fi
 
 #=============================================================================
index 2db71a61c2f0069d03bd7b54a964946363fbb253..84c534ada429a4b0650b8befe4c2a7480cf26e9b 100644 (file)
@@ -7,6 +7,28 @@ OS=$1           #set the OS Type
 #Hard coded variables
 APPNAME=mailleur
 #===============================================================
+#----------------------------------------------------------------------
+#reporting a big trouble
+sh_failure()
+
+{
+case "$OS" in
+  osukiss       )
+    echo Failure: $1
+    ;;
+  sysvinit      )
+    echo Failure: $1
+    ;;
+  systemd       )
+    echo -n $1 ; failure;
+    ;;
+  *             )
+    echo "sh_failure: Unexpected OS=$OS, exiting!"
+    exit 1
+    ;;
+  esac
+}
+#----------------------------------------------------------------------
 #procedure to check if the config is properly done
 #you MUST AT LEAST, specify the Data Base type to be used by clement.
 #----------------------------------------------------------------------