fix: kill old Caddy processes, fix .env permissions
This commit is contained in:
parent
b24bc4246b
commit
5e3c75d564
1 changed files with 4 additions and 1 deletions
|
|
@ -39,6 +39,9 @@ if [ "$GREENFIELD" = true ]; then
|
||||||
systemctl disable nextworkspace 2>/dev/null || true
|
systemctl disable nextworkspace 2>/dev/null || true
|
||||||
rm -f /etc/systemd/system/nextworkspace.service
|
rm -f /etc/systemd/system/nextworkspace.service
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
# Kill any lingering Caddy processes on port 80/443
|
||||||
|
pkill -f "caddy run" 2>/dev/null || true
|
||||||
|
fuser -k 80/tcp 443/tcp 2>/dev/null || true
|
||||||
# Force clean ALL old pods, containers, and networks
|
# Force clean ALL old pods, containers, and networks
|
||||||
for p in $(podman pod ls -q 2>/dev/null); do podman pod rm -f "$p" 2>/dev/null || true; done
|
for p in $(podman pod ls -q 2>/dev/null); do podman pod rm -f "$p" 2>/dev/null || true; done
|
||||||
podman rm -f caddy authelia launcher 2>/dev/null || true
|
podman rm -f caddy authelia launcher 2>/dev/null || true
|
||||||
|
|
@ -63,7 +66,7 @@ if [ "$GREENFIELD" = true ]; then
|
||||||
|
|
||||||
if [ -f "$BACKUP_DIR/.env" ]; then
|
if [ -f "$BACKUP_DIR/.env" ]; then
|
||||||
cp "$BACKUP_DIR/.env" "$TARGET_DIR/.env"
|
cp "$BACKUP_DIR/.env" "$TARGET_DIR/.env"
|
||||||
chmod 600 "$TARGET_DIR/.env"
|
chmod 644 "$TARGET_DIR/.env"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Generate Caddyfile
|
# Generate Caddyfile
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue