diff --git a/create-update-postfix-pcre-chek-files.sh b/create-update-postfix-pcre-chek-files.sh index eccc5dd..37ea03d 100755 --- a/create-update-postfix-pcre-chek-files.sh +++ b/create-update-postfix-pcre-chek-files.sh @@ -115,9 +115,11 @@ DEFAULT_ADMIN_EMAIL="argus@oopen.de" # - Is this a systemd system? # - -if [[ "X`which systemd`" = "X" ]]; then - systemd_exists=false -else +systemd_exists=false +systemd=$(which systemd) +systemctl=$(which systemctl) + +if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then systemd_exists=true fi diff --git a/install_amavis.sh b/install_amavis.sh index 5481b98..348bc9d 100755 --- a/install_amavis.sh +++ b/install_amavis.sh @@ -154,9 +154,11 @@ QUARANTINE_ADMIN=$DEFAULT_QUARANTINE_ADMIN # - Is this a systemd system? # - -if [[ "X`which systemd`" = "X" ]]; then - systemd_exists=false -else +systemd_exists=false +systemd=$(which systemd) +systemctl=$(which systemctl) + +if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then systemd_exists=true fi diff --git a/install_opendkim.sh b/install_opendkim.sh index 9b85d7a..b1e2adf 100755 --- a/install_opendkim.sh +++ b/install_opendkim.sh @@ -94,9 +94,11 @@ echo_skipped() { # - Is 'systemd' supported on this system # - -if [ "X`which systemd`" = "X" ]; then - SYSTEMD_EXISTS=false -else +SYSTEMD_EXISTS=false +systemd=$(which systemd) +systemctl=$(which systemctl) + +if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then SYSTEMD_EXISTS=true fi diff --git a/install_opendmarc.sh b/install_opendmarc.sh index dafd81d..c33c530 100755 --- a/install_opendmarc.sh +++ b/install_opendmarc.sh @@ -116,9 +116,11 @@ echo_skipped() { # - Is 'systemd' supported on this system # - -if [ "X`which systemd`" = "X" ]; then - SYSTEMD_EXISTS=false -else +SYSTEMD_EXISTS=false +systemd=$(which systemd) +systemctl=$(which systemctl) + +if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then SYSTEMD_EXISTS=true fi diff --git a/install_postfix_advanced.sh b/install_postfix_advanced.sh index f43ad79..d7d0c89 100755 --- a/install_postfix_advanced.sh +++ b/install_postfix_advanced.sh @@ -136,9 +136,11 @@ DEFAULT_INSTALL_DMARC_REPORT_SUPPORT=false # - Is this a systemd system? # - -if [[ "X`which systemd`" = "X" ]]; then - systemd_exists=false -else +systemd_exists=false +systemd=$(which systemd) +systemctl=$(which systemctl) + +if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then systemd_exists=true fi diff --git a/install_postfix_base.sh b/install_postfix_base.sh index f8f4a02..2286054 100755 --- a/install_postfix_base.sh +++ b/install_postfix_base.sh @@ -136,9 +136,11 @@ DEFAULT_REWRITE_SENDER_DOMAIN=None # - Is this a systemd system? # - -if [[ "X`which systemd`" = "X" ]]; then - systemd_exists=false -else +systemd_exists=false +systemd=$(which systemd) +systemctl=$(which systemctl) + +if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then systemd_exists=true fi diff --git a/install_postfwd.sh b/install_postfwd.sh index 3b43db2..beec916 100755 --- a/install_postfwd.sh +++ b/install_postfwd.sh @@ -65,6 +65,14 @@ echo_skipped() { echo -e "\033[80G[ \033[33m\033[1mskipped\033[m ]" } +systemd_exists=false +systemd=$(which systemd) +systemctl=$(which systemctl) + +if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then + systemd_exists=true +fi + ## - Install Postfix Firewall Daemon from debian packages system ## - echononl " Install Postfix Firewall Daemon from debian packages system" diff --git a/install_update_dovecot-2.4.sh b/install_update_dovecot-2.4.sh index 5484cd7..670e337 100755 --- a/install_update_dovecot-2.4.sh +++ b/install_update_dovecot-2.4.sh @@ -964,9 +964,11 @@ delete_variable_with_comments() { # - Support systemd ? # - -if [[ "X$(which systemd)" = "X" ]]; then - SYSTEMD_EXISTS=false -else +SYSTEMD_EXISTS=false +systemd=$(which systemd) +systemctl=$(which systemctl) + +if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then SYSTEMD_EXISTS=true fi diff --git a/install_update_dovecot.sh b/install_update_dovecot.sh index 63a341d..ab60c35 100755 --- a/install_update_dovecot.sh +++ b/install_update_dovecot.sh @@ -148,9 +148,11 @@ detect_os_1 () { # - Support systemd ? # - -if [[ "X$(which systemd)" = "X" ]]; then - SYSTEMD_EXISTS=false -else +SYSTEMD_EXISTS=false +systemd=$(which systemd) +systemctl=$(which systemctl) + +if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then SYSTEMD_EXISTS=true fi diff --git a/install_vacation.sh b/install_vacation.sh index 4b4ff22..47630a5 100755 --- a/install_vacation.sh +++ b/install_vacation.sh @@ -95,6 +95,16 @@ echo_skipped() { echo -e "\033[75G[ \033[30m\033[1mskipped\033[m ]" } +# -Is systemd supported on this system? +# - +systemd_supported=false +systemd=$(which systemd) +systemctl=$(which systemctl) + +if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then + systemd_supported=true +fi + if [ "$POSTFIX_DB_TYPE" = "postgres" -o "$POSTFIX_DB_TYPE" = "postgresql" -o "$POSTFIX_DB_TYPE" = "pgsql" -o "$POSTFIX_DB_TYPE" = "psql" ];then POSTFIX_DB_TYPE=pgsql diff --git a/update_clamav-unofficial-sigs.sh b/update_clamav-unofficial-sigs.sh index cba3b53..0cd7daf 100755 --- a/update_clamav-unofficial-sigs.sh +++ b/update_clamav-unofficial-sigs.sh @@ -182,9 +182,11 @@ fi # - Is this a systemd system? # - -if [[ "X`which systemd`" = "X" ]]; then - systemd_exists=false -else +systemd_exists=false +systemd=$(which systemd) +systemctl=$(which systemctl) + +if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then systemd_exists=true fi diff --git a/update_postfix_dh_parameters.sh b/update_postfix_dh_parameters.sh index 7c5d488..2e7d046 100755 --- a/update_postfix_dh_parameters.sh +++ b/update_postfix_dh_parameters.sh @@ -126,9 +126,11 @@ DEFAULT_SASL_AUTH=false # - Is this a systemd system? # - -if [[ "X`which systemd`" = "X" ]]; then - systemd_exists=false -else +systemd_exists=false +systemd=$(which systemd) +systemctl=$(which systemctl) + +if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then systemd_exists=true fi