diff --git a/install_update_dovecot.sh b/install_update_dovecot.sh index d249346..72d18cb 100755 --- a/install_update_dovecot.sh +++ b/install_update_dovecot.sh @@ -3779,52 +3779,88 @@ else fatal "Adjusting file /usr/local/dovecot-${_version}/etc/dovecot/conf.d/20-managesieve.conf failed" fi -_set_link="" -echo -echo "Set symlink " -echo -e -n " /usr/local/dovecot --> dovecot-${_version} /usr/local/dovecot? [y/n]: " -read _set_link -if [ "y" = "$_set_link" -o "Y" = "$_set_link" -o "Yes" = "$_set_link" -o "yes" = "$_set_link" ];then - echononl "\tCreate symlink.." - rm -f /usr/local/dovecot - ln -s dovecot-${_version} /usr/local/dovecot - if [ "$?" = 0 ]; then - echo -e "$rc_done" - else - echo -e "$rc_failed" - fatal "Creating Symlink /usr/local/dovecot --> dovecot-${_version} /usr/local/dovecot failed" - fi +#_set_link="" +#echo +#echo "Set symlink " +#echo -e -n " /usr/local/dovecot --> dovecot-${_version} /usr/local/dovecot? [y/n]: " +#read _set_link +#if [ "y" = "$_set_link" -o "Y" = "$_set_link" -o "Yes" = "$_set_link" -o "yes" = "$_set_link" ];then +# echononl "\tCreate symlink.." +# rm -f /usr/local/dovecot +# ln -s dovecot-${_version} /usr/local/dovecot +# if [ "$?" = 0 ]; then +# echo -e "$rc_done" +# else +# echo -e "$rc_failed" +# fatal "Creating Symlink /usr/local/dovecot --> dovecot-${_version} /usr/local/dovecot failed" +# fi +#fi + +blank_line +echononl "\tCreate symlink.." +rm -f /usr/local/dovecot +ln -s dovecot-${_version} /usr/local/dovecot +if [ "$?" = 0 ]; then + echo -e "$rc_done" +else + echo -e "$rc_failed" + fatal "Creating Symlink /usr/local/dovecot --> dovecot-${_version} /usr/local/dovecot failed" fi -_restart="" -echo -echo -e -n "Start/Restart services (dovecot/postfix)? [y/n]: " -read _restart -if [ "y" = "$_restart" -o "Y" = "$_restart" -o "Yes" = "$_restart" -o "yes" = "$_restart" ];then - echononl "\tStart dovecot service.." - if $systemd_support ; then - systemctl start dovecot - else - /etc/init.d/dovecot start > /dev/null 2>&1 - fi - if [ "$?" = 0 ]; then - echo -e "$rc_done" - else - echo -e "$rc_failed" - error "Starting dovecot service failed" - fi - echononl "\tRestart postfix.." - if $SYSTEMD_EXISTS ; then - systemctl restart postfix - else - /etc/init.d/postfix restart > /dev/null 2>&1 - fi - if [ "$?" = 0 ]; then - echo -e "$rc_done" - else - echo -e "$rc_failed" - fatal "Restarting postfix failed" - fi +#_restart="" +#echo +#echo -e -n "Start/Restart services (dovecot/postfix)? [y/n]: " +#read _restart +#if [ "y" = "$_restart" -o "Y" = "$_restart" -o "Yes" = "$_restart" -o "yes" = "$_restart" ];then +# echononl "\tStart dovecot service.." +# if $systemd_support ; then +# systemctl start dovecot +# else +# /etc/init.d/dovecot start > /dev/null 2>&1 +# fi +# if [ "$?" = 0 ]; then +# echo -e "$rc_done" +# else +# echo -e "$rc_failed" +# error "Starting dovecot service failed" +# fi +# echononl "\tRestart postfix.." +# if $SYSTEMD_EXISTS ; then +# systemctl restart postfix +# else +# /etc/init.d/postfix restart > /dev/null 2>&1 +# fi +# if [ "$?" = 0 ]; then +# echo -e "$rc_done" +# else +# echo -e "$rc_failed" +# fatal "Restarting postfix failed" +# fi +#fi + +echononl "\tStart dovecot service.." +if $systemd_support ; then + systemctl start dovecot +else + /etc/init.d/dovecot start > /dev/null 2>&1 +fi +if [ "$?" = 0 ]; then + echo -e "$rc_done" +else + echo -e "$rc_failed" + error "Starting dovecot service failed" +fi +echononl "\tRestart postfix.." +if $SYSTEMD_EXISTS ; then + systemctl restart postfix +else + /etc/init.d/postfix restart > /dev/null 2>&1 +fi +if [ "$?" = 0 ]; then + echo -e "$rc_done" +else + echo -e "$rc_failed" + fatal "Restarting postfix failed" fi