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

Update installers for hestia global config in /etc

Robert Zollner 5 лет назад
Родитель
Сommit
d745459209
2 измененных файлов с 12 добавлено и 0 удалено
  1. 6 0
      install/hst-install-debian.sh
  2. 6 0
      install/hst-install-ubuntu.sh

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

@@ -949,6 +949,12 @@ mkdir -p /etc/sudoers.d
 cp -f $HESTIA_INSTALL_DIR/sudo/admin /etc/sudoers.d/
 chmod 440 /etc/sudoers.d/admin
 
+# Add Hestia global config
+if [[ ! -e /etc/hestiacp/hestia.conf ]]; then
+    mkdir -p /etc/hestiacp
+    echo -e "# Do not edit this file, will get overwritten on next upgrade, use /etc/hestiacp/local.conf instead\n\nexport HESTIA='/usr/local/hestia'\n\n[[ -f /etc/hestiacp/local.conf ]] && source /etc/hestiacp/local.conf" > /etc/hestiacp/hestia.conf
+fi
+
 # Configuring system env
 echo "export HESTIA='$HESTIA'" > /etc/profile.d/hestia.sh
 echo 'PATH=$PATH:'$HESTIA'/bin' >> /etc/profile.d/hestia.sh

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

@@ -1006,6 +1006,12 @@ mkdir -p /etc/sudoers.d
 cp -f $HESTIA_INSTALL_DIR/sudo/admin /etc/sudoers.d/
 chmod 440 /etc/sudoers.d/admin
 
+# Add Hestia global config
+if [[ ! -e /etc/hestiacp/hestia.conf ]]; then
+    mkdir -p /etc/hestiacp
+    echo -e "# Do not edit this file, will get overwritten on next upgrade, use /etc/hestiacp/local.conf instead\n\nexport HESTIA='/usr/local/hestia'\n\n[[ -f /etc/hestiacp/local.conf ]] && source /etc/hestiacp/local.conf" > /etc/hestiacp/hestia.conf
+fi
+
 # Configuring system env
 echo "export HESTIA='$HESTIA'" > /etc/profile.d/hestia.sh
 echo 'PATH=$PATH:'$HESTIA'/bin' >> /etc/profile.d/hestia.sh