install_update_dovecot.sh: don't ask for setting symlink an also don't ask for restarting mail services.

This commit is contained in:
Christoph 2020-04-25 18:17:56 +02:00
parent bb751add0d
commit 591a2c6b82

View File

@ -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
#_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
else
echo -e "$rc_failed"
fatal "Creating Symlink /usr/local/dovecot --> dovecot-${_version} /usr/local/dovecot failed"
fi
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
#_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
else
/etc/init.d/dovecot start > /dev/null 2>&1
fi
if [ "$?" = 0 ]; then
fi
if [ "$?" = 0 ]; then
echo -e "$rc_done"
else
else
echo -e "$rc_failed"
error "Starting dovecot service failed"
fi
echononl "\tRestart postfix.."
if $SYSTEMD_EXISTS ; then
fi
echononl "\tRestart postfix.."
if $SYSTEMD_EXISTS ; then
systemctl restart postfix
else
else
/etc/init.d/postfix restart > /dev/null 2>&1
fi
if [ "$?" = 0 ]; then
fi
if [ "$?" = 0 ]; then
echo -e "$rc_done"
else
else
echo -e "$rc_failed"
fatal "Restarting postfix failed"
fi
fi