#!/bin/bash # Checking root permissions if [ "x$(id -u)" != 'x0' ]; then echo "Error: Script can be run executed only by root" exit 10 fi if [ -z "$HESTIA" ]; then HESTIA="/usr/local/hestia" fi user='admin' fm_error='no' source $HESTIA/func/main.sh source $HESTIA/install/upgrade/upgrade.conf if [ -z "$HOMEDIR" ] || [ -z "$HESTIA_INSTALL_DIR" ]; then echo "Error: Hestia environment vars not present" exit 2 fi FM_INSTALL_DIR="$HESTIA/web/fm" FM_FILE="filegator_latest" FM_URL="https://github.com/filegator/static/raw/master/builds/filegator_latest.zip" COMPOSER_BIN="$HOMEDIR/$user/.composer/composer" if [ ! -f "$COMPOSER_BIN" ]; then $BIN/v-add-user-composer "$user" if [ $? -ne 0 ]; then $BIN/v-add-user-notification admin 'Composer installation failed!' '

The File Manager will not work without Composer.

Please try running the installer from a shell session:
bash $HESTIA/install/deb/filemanager/install-fm.sh

If this issue continues, please open an issue on GitHub.

' fm_error='yes' fi fi if [ "$fm_error" != "yes" ]; then rm --recursive --force "$FM_INSTALL_DIR" mkdir -p "$FM_INSTALL_DIR" cd "$FM_INSTALL_DIR" [ ! -f "${FM_INSTALL_DIR}/${FM_FILE}" ] && wget "$FM_URL" --quiet -O "${FM_INSTALL_DIR}/${FM_FILE}.zip" unzip -qq "${FM_INSTALL_DIR}/${FM_FILE}.zip" mv --force ${FM_INSTALL_DIR}/filegator/* "${FM_INSTALL_DIR}" rm --recursive --force ${FM_INSTALL_DIR}/${FM_FILE} [[ -f "${FM_INSTALL_DIR}/${FM_FILE}" ]] && rm "${FM_INSTALL_DIR}/${FM_FILE}" cp --recursive --force ${HESTIA_INSTALL_DIR}/filemanager/filegator/* "${FM_INSTALL_DIR}" chown $user: -R "${FM_INSTALL_DIR}" # Check if php7.3 is available and run the installer if [ -f "/usr/bin/php7.3" ]; then COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec /usr/bin/php7.3 $COMPOSER_BIN --quiet --no-dev install if [ $? -ne 0 ]; then $BIN/v-add-user-notification admin 'File Manager installation failed!' '

Please try running the installer from a shell session:
bash $HESTIA/install/deb/filemanager/install-fm.sh

If this issue continues, please open an issue on GitHub.

' fm_error="yes" fi else $BIN/v-add-user-notification admin 'File Manager installation failed!' '

Unable to proceed with installation of File Manager.

Package php7.3-cli is missing from your system. Please check your PHP installation and environment settings.

' fm_error="yes" fi if [ "$fm_error" != "yes" ]; then chown root: -R "${FM_INSTALL_DIR}" chown $user: "${FM_INSTALL_DIR}/private" chown $user: "${FM_INSTALL_DIR}/private/logs" chown $user: "${FM_INSTALL_DIR}/repository" fi fi