Compare commits

..

No commits in common. "67eabf2e1d19cdb674221ec36407b3bc0ce6ef2e" and "90c42e90c82bd68172f23f398cce6b105d652eeb" have entirely different histories.

View File

@ -67,12 +67,10 @@ function msg_error() {
local msg="$1" local msg="$1"
echo -e "${CROSS} ${RD}${msg}${CL}" echo -e "${CROSS} ${RD}${msg}${CL}"
} }
# Check existing installation # Check existing installation
if [[ -f "$INSTALL_PATH" ]]; then if [[ -f "$INSTALL_PATH" ]]; then
echo -e "${YW}⚠️ ${APP} is already installed.${CL}" echo -e "${YW}⚠️ ${APP} is already installed.${CL}"
echo -n "Uninstall ${APP}? (y/N): " read -r -p "Uninstall ${APP}? (y/N): " uninstall_prompt
read -r uninstall_prompt
if [[ "${uninstall_prompt,,}" =~ ^(y|yes)$ ]]; then if [[ "${uninstall_prompt,,}" =~ ^(y|yes)$ ]]; then
msg_info "Uninstalling ${APP}" msg_info "Uninstalling ${APP}"
if [[ "$OS" == "Debian" ]]; then if [[ "$OS" == "Debian" ]]; then
@ -88,8 +86,7 @@ if [[ -f "$INSTALL_PATH" ]]; then
exit 0 exit 0
fi fi
echo -n "Update ${APP}? (y/N): " read -r -p "Update ${APP}? (y/N): " update_prompt
read -r update_prompt
if [[ "${update_prompt,,}" =~ ^(y|yes)$ ]]; then if [[ "${update_prompt,,}" =~ ^(y|yes)$ ]]; then
msg_info "Updating ${APP}" msg_info "Updating ${APP}"
curl -fsSL https://github.com/gtsteffaniak/filebrowser/releases/latest/download/linux-amd64-filebrowser -o "$INSTALL_PATH" curl -fsSL https://github.com/gtsteffaniak/filebrowser/releases/latest/download/linux-amd64-filebrowser -o "$INSTALL_PATH"
@ -103,12 +100,10 @@ if [[ -f "$INSTALL_PATH" ]]; then
fi fi
echo -e "${YW}⚠️ ${APP} is not installed.${CL}" echo -e "${YW}⚠️ ${APP} is not installed.${CL}"
echo -n "Enter port number (Default: ${DEFAULT_PORT}): " read -r -p "Enter port number (Default: ${DEFAULT_PORT}): " PORT
read -r PORT
PORT=${PORT:-$DEFAULT_PORT} PORT=${PORT:-$DEFAULT_PORT}
echo -n "Install ${APP}? (y/n): " read -r -p "Install ${APP}? (y/n): " install_prompt
read -r install_prompt
if [[ "${install_prompt,,}" =~ ^(y|yes)$ ]]; then if [[ "${install_prompt,,}" =~ ^(y|yes)$ ]]; then
msg_info "Installing ${APP} on ${OS}" msg_info "Installing ${APP} on ${OS}"
$PKG_MANAGER curl ffmpeg &>/dev/null $PKG_MANAGER curl ffmpeg &>/dev/null
@ -122,8 +117,7 @@ if [[ "${install_prompt,,}" =~ ^(y|yes)$ ]]; then
chmod 755 /usr/local/community-scripts chmod 755 /usr/local/community-scripts
msg_ok "Directory prepared" msg_ok "Directory prepared"
echo -n "Use No Authentication? (y/N): " read -r -p "Use No Authentication? (y/N): " noauth_prompt
read -r noauth_prompt
if [[ "${noauth_prompt,,}" =~ ^(y|yes)$ ]]; then if [[ "${noauth_prompt,,}" =~ ^(y|yes)$ ]]; then
cat <<EOF >"$CONFIG_PATH" cat <<EOF >"$CONFIG_PATH"