Skip to content

Commit 4208a95

Browse files
ahrasisTill Brehm
authored andcommitted
Update letsencrypt_renew_hook.sh as dovecot-imapd is just dovecot in Red Hat / Centos as advised in https://git.ispconfig.org/ms217.
1 parent fcd0465 commit 4208a95

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

install/lib/installer_base.lib.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2083,12 +2083,12 @@ public function make_ispconfig_ssl_cert() {
20832083

20842084
// This script is needed earlier to check and open http port 80 or standalone might fail
20852085
// Make executable and temporary symlink latest letsencrypt pre, post and renew hook script before install
2086-
if (file_exists('/tmp/ispconfig3_install/server/scripts/letsencrypt_pre_hook.sh'))
2087-
symlink('/tmp/ispconfig3_install/server/scripts/letsencrypt_pre_hook.sh', '/usr/local/bin/letsencrypt_pre_hook.sh');
2088-
if (file_exists('/tmp/ispconfig3_install/server/scripts/letsencrypt_post_hook.sh'))
2089-
symlink('/tmp/ispconfig3_install/server/scripts/letsencrypt_post_hook.sh', '/usr/local/bin/letsencrypt_post_hook.sh');
2090-
if (file_exists('/tmp/ispconfig3_install/server/scripts/letsencrypt_renew_hook.sh'))
2091-
symlink('/tmp/ispconfig3_install/server/scripts/letsencrypt_renew_hook.sh', '/usr/local/bin/letsencrypt_renew_hook.sh');
2086+
if (file_exists(dirname(getcwd()) . '/server/scripts/letsencrypt_pre_hook.sh'))
2087+
symlink(dirname(getcwd()) . '/server/scripts/letsencrypt_pre_hook.sh', '/usr/local/bin/letsencrypt_pre_hook.sh');
2088+
if (file_exists(dirname(getcwd()) . '/server/scripts/letsencrypt_post_hook.sh'))
2089+
symlink(dirname(getcwd()) . '/server/scripts/letsencrypt_post_hook.sh', '/usr/local/bin/letsencrypt_post_hook.sh');
2090+
if (file_exists(dirname(getcwd()) . '/server/scripts/letsencrypt_renew_hook.sh'))
2091+
symlink(dirname(getcwd()) . '/server/scripts/letsencrypt_renew_hook.sh', '/usr/local/bin/letsencrypt_renew_hook.sh');
20922092
chown('/usr/local/bin/letsencrypt_pre_hook.sh', 'root');
20932093
chown('/usr/local/bin/letsencrypt_post_hook.sh', 'root');
20942094
chown('/usr/local/bin/letsencrypt_renew_hook.sh', 'root');

install/uninstall.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@
8888
exec('rm -rf /usr/local/ispconfig');
8989

9090
// Delete various other files
91+
@unlink("/usr/local/bin/letsencrypt_post_hook.sh");
92+
@unlink("/usr/local/bin/letsencrypt_pre_hook.sh");
93+
@unlink("/usr/local/bin/letsencrypt_renew_hook.sh");
9194
@unlink("/usr/local/bin/ispconfig_update.sh");
9295
@unlink("/usr/local/bin/ispconfig_update_from_svn.sh");
9396
@unlink("/var/spool/mail/ispconfig");

server/scripts/letsencrypt_renew_hook.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@ lelive=/etc/letsencrypt/live/$(hostname -f); if [ -d "$lelive" ]; then
1717
pureftpdpem=/etc/ssl/private/pure-ftpd.pem; if [ -e "$pureftpdpem" ]; then chmod 600 $pureftpdpem; fi
1818
# For Red Hat, Centos or derivatives
1919
if which yum &> /dev/null 2>&1 ; then
20-
if [ rpm -q pure-ftpd-mysql ]; then service pure-ftpd-mysql restart; fi
20+
if [ rpm -q pure-ftpd ]; then service pure-ftpd restart; fi
2121
if [ rpm -q monit ]; then service monit restart; fi
2222
if [ rpm -q postfix ]; then service postfix restart; fi
23-
if [ rpm -q dovecot-imapd ]; then service dovecot restart; fi
24-
if [ rpm -q mysql ]; then service mysql restart; fi
25-
if [ rpm -q mariadb ]; then service mysql restart; fi
23+
if [ rpm -q dovecot ]; then service dovecot restart; fi
24+
if [ rpm -q mysql-server ]; then service mysqld restart; fi
25+
if [ rpm -q mariadb-server ]; then service mariadb restart; fi
26+
if [ rpm -q MariaDB-server ]; then service mysql restart; fi
2627
if [ rpm -q nginx ]; then service nginx restart; fi
27-
if [ rpm -q apache2 ]; then service apache2 restart; fi
28+
if [ rpm -q httpd ]; then service httpd restart; fi
2829
# For Debian, Ubuntu or derivatives
2930
elif apt-get -v >/dev/null 2>&1 ; then
3031
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

0 commit comments

Comments
 (0)