Updated installer
This commit is contained in:
parent
58f0fe6adc
commit
b5cde53127
1
config/aliases.sh
Normal file
1
config/aliases.sh
Normal file
@ -0,0 +1 @@
|
||||
alias smbtools="bash $SMB_TOOLS_PATH/gui/main.sh"
|
@ -3,6 +3,7 @@ services:
|
||||
filebrowser:
|
||||
image: filebrowser/filebrowser:latest
|
||||
container_name: filebrowser
|
||||
restart: always
|
||||
entrypoint: ./start.sh
|
||||
volumes:
|
||||
- /data:/srv #Change to match your directory
|
||||
|
25
install.sh
25
install.sh
@ -1,5 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Define colors
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
|
||||
echo -e "${GREEN}------------------------${NC}"
|
||||
echo -e "${GREEN} SmbTools installer ${NC}"
|
||||
echo -e "${GREEN}------------------------${NC}"
|
||||
@ -28,12 +34,23 @@ else
|
||||
echo "Added SMB_TOOLS_PATH to ~/.bashrc"
|
||||
fi
|
||||
|
||||
source $HOME/.bashrc
|
||||
ALIASES_LINE="source $SMB_TOOLS_PATH/config/aliases.sh"
|
||||
|
||||
# Set it for the current script execution too
|
||||
export SMB_TOOLS_PATH="$SCRIPT_DIR"
|
||||
echo "SMB_TOOLS_PATH set to: $SMB_TOOLS_PATH"
|
||||
# Check if it's already set in .bashrc
|
||||
if grep -Fxq "$ALIASES_LINE" "$HOME/.bashrc"; then
|
||||
echo "SmbTools aliases already set"
|
||||
else
|
||||
echo "$ALIASES_LINE" >> "$HOME/.bashrc"
|
||||
echo "Set SmbTools aliases"
|
||||
fi
|
||||
|
||||
source $HOME/.bashrc
|
||||
|
||||
cd filebrowser
|
||||
bash ./install.sh
|
||||
cd ..
|
||||
|
||||
echo -e "${YELLOW}------------------------------------------------------${NC}"
|
||||
echo -e "${YELLOW} !!! WARNING !!! ${NC}"
|
||||
echo -e "${YELLOW} The computer must be restarted to complete the setup ${NC}"
|
||||
echo -e "${YELLOW}------------------------------------------------------${NC}"
|
Loading…
x
Reference in New Issue
Block a user