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:
|
filebrowser:
|
||||||
image: filebrowser/filebrowser:latest
|
image: filebrowser/filebrowser:latest
|
||||||
container_name: filebrowser
|
container_name: filebrowser
|
||||||
|
restart: always
|
||||||
entrypoint: ./start.sh
|
entrypoint: ./start.sh
|
||||||
volumes:
|
volumes:
|
||||||
- /data:/srv #Change to match your directory
|
- /data:/srv #Change to match your directory
|
||||||
|
25
install.sh
25
install.sh
@ -1,5 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Define colors
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
YELLOW='\033[1;33m'
|
||||||
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
|
|
||||||
echo -e "${GREEN}------------------------${NC}"
|
echo -e "${GREEN}------------------------${NC}"
|
||||||
echo -e "${GREEN} SmbTools installer ${NC}"
|
echo -e "${GREEN} SmbTools installer ${NC}"
|
||||||
echo -e "${GREEN}------------------------${NC}"
|
echo -e "${GREEN}------------------------${NC}"
|
||||||
@ -28,12 +34,23 @@ else
|
|||||||
echo "Added SMB_TOOLS_PATH to ~/.bashrc"
|
echo "Added SMB_TOOLS_PATH to ~/.bashrc"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source $HOME/.bashrc
|
ALIASES_LINE="source $SMB_TOOLS_PATH/config/aliases.sh"
|
||||||
|
|
||||||
# Set it for the current script execution too
|
# Check if it's already set in .bashrc
|
||||||
export SMB_TOOLS_PATH="$SCRIPT_DIR"
|
if grep -Fxq "$ALIASES_LINE" "$HOME/.bashrc"; then
|
||||||
echo "SMB_TOOLS_PATH set to: $SMB_TOOLS_PATH"
|
echo "SmbTools aliases already set"
|
||||||
|
else
|
||||||
|
echo "$ALIASES_LINE" >> "$HOME/.bashrc"
|
||||||
|
echo "Set SmbTools aliases"
|
||||||
|
fi
|
||||||
|
|
||||||
|
source $HOME/.bashrc
|
||||||
|
|
||||||
cd filebrowser
|
cd filebrowser
|
||||||
bash ./install.sh
|
bash ./install.sh
|
||||||
cd ..
|
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