diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index b18f5baf2b966d28594dad6111085f0812174164..b961726ecf944926023ae3714827a40104076aa9 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -2083,12 +2083,12 @@ class installer_base { // This script is needed earlier to check and open http port 80 or standalone might fail // Make executable and temporary symlink latest letsencrypt pre, post and renew hook script before install - if (file_exists('/tmp/ispconfig3_install/server/scripts/letsencrypt_pre_hook.sh')) - symlink('/tmp/ispconfig3_install/server/scripts/letsencrypt_pre_hook.sh', '/usr/local/bin/letsencrypt_pre_hook.sh'); - if (file_exists('/tmp/ispconfig3_install/server/scripts/letsencrypt_post_hook.sh')) - symlink('/tmp/ispconfig3_install/server/scripts/letsencrypt_post_hook.sh', '/usr/local/bin/letsencrypt_post_hook.sh'); - if (file_exists('/tmp/ispconfig3_install/server/scripts/letsencrypt_renew_hook.sh')) - symlink('/tmp/ispconfig3_install/server/scripts/letsencrypt_renew_hook.sh', '/usr/local/bin/letsencrypt_renew_hook.sh'); + if (file_exists(dirname(getcwd()) . '/server/scripts/letsencrypt_pre_hook.sh')) + symlink(dirname(getcwd()) . '/server/scripts/letsencrypt_pre_hook.sh', '/usr/local/bin/letsencrypt_pre_hook.sh'); + if (file_exists(dirname(getcwd()) . '/server/scripts/letsencrypt_post_hook.sh')) + symlink(dirname(getcwd()) . '/server/scripts/letsencrypt_post_hook.sh', '/usr/local/bin/letsencrypt_post_hook.sh'); + if (file_exists(dirname(getcwd()) . '/server/scripts/letsencrypt_renew_hook.sh')) + symlink(dirname(getcwd()) . '/server/scripts/letsencrypt_renew_hook.sh', '/usr/local/bin/letsencrypt_renew_hook.sh'); chown('/usr/local/bin/letsencrypt_pre_hook.sh', 'root'); chown('/usr/local/bin/letsencrypt_post_hook.sh', 'root'); chown('/usr/local/bin/letsencrypt_renew_hook.sh', 'root'); diff --git a/install/uninstall.php b/install/uninstall.php index c565d4653d71c2667dfc6c8e6cef70fcfb502450..6ff695decc073bf522642b6b2d1cbad27f5891d4 100644 --- a/install/uninstall.php +++ b/install/uninstall.php @@ -88,6 +88,9 @@ if($do_uninstall == 'yes') { exec('rm -rf /usr/local/ispconfig'); // Delete various other files + @unlink("/usr/local/bin/letsencrypt_post_hook.sh"); + @unlink("/usr/local/bin/letsencrypt_pre_hook.sh"); + @unlink("/usr/local/bin/letsencrypt_renew_hook.sh"); @unlink("/usr/local/bin/ispconfig_update.sh"); @unlink("/usr/local/bin/ispconfig_update_from_svn.sh"); @unlink("/var/spool/mail/ispconfig"); diff --git a/server/scripts/letsencrypt_renew_hook.sh b/server/scripts/letsencrypt_renew_hook.sh index 927ea59697dd39aaa9bc8397bde8c282a08a45de..768cba70e9ab7e6c394f929bd7f3c739c05d2aef 100644 --- a/server/scripts/letsencrypt_renew_hook.sh +++ b/server/scripts/letsencrypt_renew_hook.sh @@ -17,14 +17,15 @@ lelive=/etc/letsencrypt/live/$(hostname -f); if [ -d "$lelive" ]; then pureftpdpem=/etc/ssl/private/pure-ftpd.pem; if [ -e "$pureftpdpem" ]; then chmod 600 $pureftpdpem; fi # For Red Hat, Centos or derivatives if which yum &> /dev/null 2>&1 ; then - if [ rpm -q pure-ftpd-mysql ]; then service pure-ftpd-mysql restart; fi + if [ rpm -q pure-ftpd ]; then service pure-ftpd restart; fi if [ rpm -q monit ]; then service monit restart; fi if [ rpm -q postfix ]; then service postfix restart; fi - if [ rpm -q dovecot-imapd ]; then service dovecot restart; fi - if [ rpm -q mysql ]; then service mysql restart; fi - if [ rpm -q mariadb ]; then service mysql restart; fi + if [ rpm -q dovecot ]; then service dovecot restart; fi + if [ rpm -q mysql-server ]; then service mysqld restart; fi + if [ rpm -q mariadb-server ]; then service mariadb restart; fi + if [ rpm -q MariaDB-server ]; then service mysql restart; fi if [ rpm -q nginx ]; then service nginx restart; fi - if [ rpm -q apache2 ]; then service apache2 restart; fi + if [ rpm -q httpd ]; then service httpd restart; fi # For Debian, Ubuntu or derivatives elif apt-get -v >/dev/null 2>&1 ; then if [ $(dpkg-query -W -f='${Status}' pure-ftpd-mysql 2>/dev/null | grep -c "ok installed") -eq 1 ]; then service pure-ftpd-mysql restart; fi