Просмотр исходного кода

Add /usr/local/hestia/bin/ to path variable

On new installs

If a user sudo in to root the path variable is lost and user have as 
v-update-letsencrypt-ssl: command not found
Jaap Marcus 3 лет назад
Родитель
Сommit
64cb6dd95b
2 измененных файлов с 9 добавлено и 0 удалено
  1. 4 0
      install/hst-install-debian.sh
  2. 5 0
      install/hst-install-ubuntu.sh

+ 4 - 0
install/hst-install-debian.sh

@@ -2042,6 +2042,10 @@ write_config_value "SERVER_SMTP_PASSWD" ""
 write_config_value "SERVER_SMTP_ADDR" ""
 write_config_value "POLICY_CSRF_STRICTNESS" "1"
 
+# Add /usr/local/hestia/bin/ to path variable
+echo 'if [ "${PATH#*/usr/local/hestia/bin*}" = "$PATH" ]; then
+    . /etc/profile.d/hestia.sh
+fi'  >> /root/.bashrc 
 
 #----------------------------------------------------------#
 #                   Hestia Access Info                     #

+ 5 - 0
install/hst-install-ubuntu.sh

@@ -2124,6 +2124,11 @@ write_config_value "SERVER_SMTP_PASSWD" ""
 write_config_value "SERVER_SMTP_ADDR" ""
 write_config_value "POLICY_CSRF_STRICTNESS" "1"
 
+# Add /usr/local/hestia/bin/ to path variable
+echo 'if [ "${PATH#*/usr/local/hestia/bin*}" = "$PATH" ]; then
+    . /etc/profile.d/hestia.sh
+fi'  >> /root/.bashrc 
+
 #----------------------------------------------------------#
 #                   Hestia Access Info                     #
 #----------------------------------------------------------#