Update symlink setup script for all Docker services
- Add automatic directory creation in create_symlink function - Include copyparty, portainer, and qbittorrent configs - Add landing page symlink for easier updates - Update verification commands to include all services
This commit is contained in:
@@ -29,6 +29,13 @@ create_symlink() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Create parent directory if it doesn't exist
|
||||
local link_dir=$(dirname "$link")
|
||||
if [ ! -d "$link_dir" ]; then
|
||||
echo "Creating directory: $link_dir"
|
||||
mkdir -p "$link_dir"
|
||||
fi
|
||||
|
||||
# Backup existing file if it's not already a symlink
|
||||
if [ -f "$link" ] && [ ! -L "$link" ]; then
|
||||
backup="${link}.backup.$(date +%Y%m%d_%H%M%S)"
|
||||
@@ -73,11 +80,31 @@ create_symlink "Portainer docker-compose" \
|
||||
"$REPO_ROOT/config/docker/portainer/docker-compose.yml" \
|
||||
"/opt/docker/portainer/docker-compose.yml"
|
||||
|
||||
# Copyparty docker-compose.yml
|
||||
create_symlink "Copyparty docker-compose" \
|
||||
"$REPO_ROOT/config/docker/copyparty/docker-compose.yml" \
|
||||
"/opt/docker/copyparty/docker-compose.yml"
|
||||
|
||||
# Glances docker-compose.yml
|
||||
create_symlink "Glances docker-compose" \
|
||||
"$REPO_ROOT/config/docker/glances/docker-compose.yml" \
|
||||
"/opt/docker/glances/docker-compose.yml"
|
||||
|
||||
# Syncthing docker-compose.yml
|
||||
create_symlink "Syncthing docker-compose" \
|
||||
"$REPO_ROOT/config/docker/syncthing/docker-compose.yml" \
|
||||
"/opt/docker/syncthing/docker-compose.yml"
|
||||
|
||||
# Docker daemon config
|
||||
create_symlink "Docker daemon config" \
|
||||
"$REPO_ROOT/config/docker/daemon.json" \
|
||||
"/etc/docker/daemon.json"
|
||||
|
||||
# Landing page
|
||||
create_symlink "Landing page" \
|
||||
"$REPO_ROOT/config/www/index.html" \
|
||||
"/var/www/homelab/index.html"
|
||||
|
||||
echo "==================================================================="
|
||||
echo "Summary"
|
||||
echo "==================================================================="
|
||||
@@ -96,5 +123,8 @@ echo " ls -l /opt/docker/gitea/docker-compose.yml"
|
||||
echo " ls -l /opt/docker/jellyfin/docker-compose.yml"
|
||||
echo " ls -l /opt/docker/qbittorrent/docker-compose.yml"
|
||||
echo " ls -l /opt/docker/portainer/docker-compose.yml"
|
||||
echo " ls -l /opt/docker/copyparty/docker-compose.yml"
|
||||
echo " ls -l /opt/docker/glances/docker-compose.yml"
|
||||
echo " ls -l /opt/docker/syncthing/docker-compose.yml"
|
||||
echo " ls -l /etc/docker/daemon.json"
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user