From: Jean-Marc Pigeon (Delson) Date: Wed, 18 Jun 2025 13:01:30 +0000 (-0400) Subject: Improving shell starting.sh X-Git-Tag: tag-0.9~107 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=ac2d4b2d35a2ff904e1e21d012428e24e16ebd3b;p=jmp%2Fmailleur Improving shell starting.sh --- diff --git a/mailleur.spec.in b/mailleur.spec.in index 902e2c6..d17a9e1 100644 --- a/mailleur.spec.in +++ b/mailleur.spec.in @@ -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 #============================================================================= diff --git a/support/starting.sh b/support/starting.sh index 2db71a6..84c534a 100644 --- a/support/starting.sh +++ b/support/starting.sh @@ -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. #----------------------------------------------------------------------