@@ -2853,21 +2853,21 @@ public function make_ispconfig_ssl_cert() {
28532853
28542854 // This script is needed earlier to check and open http port 80 or standalone might fail
28552855 // Make executable and temporary symlink latest letsencrypt pre, post and renew hook script before install
2856- if (file_exists (dirname (getcwd ()) . '/server/scripts/letsencrypt_pre_hook.sh ' ) && !file_exists ('/usr/local/bin/letsencrypt_pre_hook.sh ' )) {
2857- symlink (dirname (getcwd ()) . '/server/scripts/letsencrypt_pre_hook.sh ' , '/usr/local/bin/letsencrypt_pre_hook.sh ' );
2856+ if (file_exists (ISPC_INSTALL_ROOT . '/server/scripts/letsencrypt_pre_hook.sh ' ) && !file_exists ('/usr/local/bin/letsencrypt_pre_hook.sh ' )) {
2857+ symlink (ISPC_INSTALL_ROOT . '/server/scripts/letsencrypt_pre_hook.sh ' , '/usr/local/bin/letsencrypt_pre_hook.sh ' );
2858+ chown ('/usr/local/bin/letsencrypt_pre_hook.sh ' , 'root ' );
2859+ chmod ('/usr/local/bin/letsencrypt_pre_hook.sh ' , 0700 );
28582860 }
2859- if (file_exists (dirname (getcwd ()) . '/server/scripts/letsencrypt_post_hook.sh ' ) && !file_exists ('/usr/local/bin/letsencrypt_post_hook.sh ' )) {
2860- symlink (dirname (getcwd ()) . '/server/scripts/letsencrypt_post_hook.sh ' , '/usr/local/bin/letsencrypt_post_hook.sh ' );
2861+ if (file_exists (ISPC_INSTALL_ROOT . '/server/scripts/letsencrypt_post_hook.sh ' ) && !file_exists ('/usr/local/bin/letsencrypt_post_hook.sh ' )) {
2862+ symlink (ISPC_INSTALL_ROOT . '/server/scripts/letsencrypt_post_hook.sh ' , '/usr/local/bin/letsencrypt_post_hook.sh ' );
2863+ chown ('/usr/local/bin/letsencrypt_post_hook.sh ' , 'root ' );
2864+ chmod ('/usr/local/bin/letsencrypt_post_hook.sh ' , 0700 );
28612865 }
2862- if (file_exists (dirname (getcwd ()) . '/server/scripts/letsencrypt_renew_hook.sh ' ) && !file_exists ('/usr/local/bin/letsencrypt_renew_hook.sh ' )) {
2863- symlink (dirname (getcwd ()) . '/server/scripts/letsencrypt_renew_hook.sh ' , '/usr/local/bin/letsencrypt_renew_hook.sh ' );
2866+ if (file_exists (ISPC_INSTALL_ROOT . '/server/scripts/letsencrypt_renew_hook.sh ' ) && !file_exists ('/usr/local/bin/letsencrypt_renew_hook.sh ' )) {
2867+ symlink (ISPC_INSTALL_ROOT . '/server/scripts/letsencrypt_renew_hook.sh ' , '/usr/local/bin/letsencrypt_renew_hook.sh ' );
2868+ chown ('/usr/local/bin/letsencrypt_renew_hook.sh ' , 'root ' );
2869+ chmod ('/usr/local/bin/letsencrypt_renew_hook.sh ' , 0700 );
28642870 }
2865- chown ('/usr/local/bin/letsencrypt_pre_hook.sh ' , 'root ' );
2866- chown ('/usr/local/bin/letsencrypt_post_hook.sh ' , 'root ' );
2867- chown ('/usr/local/bin/letsencrypt_renew_hook.sh ' , 'root ' );
2868- chmod ('/usr/local/bin/letsencrypt_pre_hook.sh ' , 0700 );
2869- chmod ('/usr/local/bin/letsencrypt_post_hook.sh ' , 0700 );
2870- chmod ('/usr/local/bin/letsencrypt_renew_hook.sh ' , 0700 );
28712871
28722872 // Check http port 80 status as it cannot be determined at post hook stage
28732873 $ port80_status =exec ('true &>/dev/null </dev/tcp/127.0.0.1/80 && echo open || echo close ' );
0 commit comments