Update Guardian installation and update scripts to use example docker-compose.yml and remove unnecessary comments

This commit is contained in:
Vincent 2025-09-30 16:10:18 -04:00
parent 544150a57a
commit e48f2c35a8
2 changed files with 1 additions and 12 deletions

View File

@ -39,10 +39,8 @@ function update_script() {
msg_ok "Stopped $APP" msg_ok "Stopped $APP"
msg_info "Updating $APP to v${RELEASE}" msg_info "Updating $APP to v${RELEASE}"
# Download new docker-compose.yml curl -fsSL -o docker-compose.yml "https://raw.githubusercontent.com/HydroshieldMKII/Guardian/main/docker-compose.example.yml"
curl -fsSL -o docker-compose.yml "https://raw.githubusercontent.com/HydroshieldMKII/Guardian/main/docker-compose.yml"
# Pull new Docker images
docker compose pull docker compose pull
echo "${RELEASE}" >/opt/${APP}_version.txt echo "${RELEASE}" >/opt/${APP}_version.txt
@ -54,7 +52,6 @@ function update_script() {
msg_ok "Started $APP" msg_ok "Started $APP"
msg_info "Cleaning Up" msg_info "Cleaning Up"
rm -f /tmp/plex-guard.db.backup
docker system prune -f docker system prune -f
msg_ok "Cleanup Completed" msg_ok "Cleanup Completed"

View File

@ -21,7 +21,6 @@ $STD apt-get install -y \
lsb-release lsb-release
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
# Install Docker
msg_info "Installing Docker" msg_info "Installing Docker"
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
@ -30,28 +29,21 @@ $STD apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plu
systemctl enable --now docker systemctl enable --now docker
msg_ok "Installed Docker" msg_ok "Installed Docker"
# Setup Guardian
msg_info "Setting up Guardian" msg_info "Setting up Guardian"
mkdir -p /opt/Guardian mkdir -p /opt/Guardian
cd /opt/Guardian cd /opt/Guardian
# Download docker-compose.yml from repository
RELEASE=$(curl -fsSL https://api.github.com/repos/HydroshieldMKII/Guardian/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') RELEASE=$(curl -fsSL https://api.github.com/repos/HydroshieldMKII/Guardian/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
curl -fsSL -o docker-compose.yml "https://raw.githubusercontent.com/HydroshieldMKII/Guardian/main/docker-compose.example.yml" curl -fsSL -o docker-compose.yml "https://raw.githubusercontent.com/HydroshieldMKII/Guardian/main/docker-compose.example.yml"
# Create data directory for persistent storage
mkdir -p data
echo "${RELEASE}" >/opt/Guardian_version.txt echo "${RELEASE}" >/opt/Guardian_version.txt
msg_ok "Setup Guardian" msg_ok "Setup Guardian"
# Start Guardian with Docker Compose
msg_info "Starting Guardian" msg_info "Starting Guardian"
cd /opt/Guardian cd /opt/Guardian
docker compose up -d docker compose up -d
msg_ok "Started Guardian" msg_ok "Started Guardian"
# Create systemd service to manage Docker Compose
msg_info "Creating Guardian Service" msg_info "Creating Guardian Service"
cat <<EOF >/etc/systemd/system/guardian.service cat <<EOF >/etc/systemd/system/guardian.service
[Unit] [Unit]