Add first final version of vw deployment and haproxy

This commit is contained in:
2025-05-03 23:00:55 +02:00
parent d2f8acb02b
commit 250662c65e
7 changed files with 74 additions and 178 deletions

23
vaultwarden/uninstall.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
. env.sh
if systemctl --user list-units --full --all | grep -q "vaultwarden-${CONTAINER_NAME}.service"; then
systemctl --user stop vaultwarden-${CONTAINER_NAME}.service
fi
if podman container exists "$CONTAINER_NAME"; then
echo "Stop and delete existing container $CONTAINER_NAME"
if podman inspect -f '{{.State.Running}}' "$CONTAINER_NAME" | grep -q true; then
podman stop "$CONTAINER_NAME"
fi
podman rm "$CONTAINER_NAME"
fi
systemctl --user disable --now vaultwarden-$CONTAINER_NAME.service
rm $USER_SYSTEMD/vaultwarden-$CONTAINER_NAME.service
systemctl --user daemon-reload
sudo rm -r $SERVICE_DIR
echo "Uninstall complete. Manually run haproxy config to rebuild config."