]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Improving starting.sh shell script
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Mon, 30 Jun 2025 14:21:02 +0000 (10:21 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Mon, 30 Jun 2025 14:21:23 +0000 (10:21 -0400)
support/starting.sh

index cd0238b200131bdf2795a1f06557ec9b3b1e79e0..19a764d9f484eaaba396e23b961ef95ed5d8ccfa 100755 (executable)
@@ -60,10 +60,12 @@ sh_failure()
 {
 case "$OS" in
   "osukiss"    )
-    echo [ FAIL ] $1
+    /usr/bin/echo -n -e "${BMPREFIX}${@}"
+    /usr/bin/echo -e "${CURS_ZERO}${FAILURE_SUFFIX}"
     ;;
   "sysvinit"   )
-    echo [ FAIL ] $1
+    /usr/bin/echo -n -e "${BMPREFIX}${@}"
+    /usr/bin/echo -e "${CURS_ZERO}${FAILURE_SUFFIX}"
     ;;
   "systemd"       )
     echo -n $1 ; failure;
@@ -81,10 +83,12 @@ sh_warning()
 {
 case "$OS" in 
   "osukiss"    )
-    echo [ WARNING ] $1
+    /usr/bin/echo -n -e "${BMPREFIX}${@}"
+    /usr/bin/echo -e "${CURS_ZERO}${WARNING_SUFFIX}"
     ;;
   "sysvinit"   )
-    echo [ WARNING ] $1
+    /usr/bin/echo -n -e "${BMPREFIX}${@}"
+    /usr/bin/echo -e "${CURS_ZERO}${WARNING_SUFFIX}"
     ;;
   "systemd"    )
     echo -n $2 ; warning;
@@ -106,7 +110,8 @@ case "$OS" in
     /usr/bin/echo -e "${CURS_ZERO}${SUCCESS_SUFFIX}"
     ;;
   "sysvinit"   )
-    echo [ OK ] $1
+    /usr/bin/echo -n -e "${BMPREFIX}${@}"
+    /usr/bin/echo -e "${CURS_ZERO}${SUCCESS_SUFFIX}"
     ;;
   "systemd"    )
     echo -n $1 ; success;
@@ -198,7 +203,7 @@ if [ ! -f /etc/pki/$APPNAME/$APPNAME-cert.pem ] ; then
   chown $APPNAME:mail                                  \
        /etc/pki/$APPNAME/$APPNAME-cert.pem             \
        /etc/pki/$APPNAME/$APPNAME-key.pem
-  sh_success $"Preparing $APPNAME server certificate"
+  sh_success $"Preparing $APPNAME server self-signed certificate"
   fi
 }
 #----------------------------------------------------------------------