first working version of gitea, now to add backup

This commit is contained in:
2025-05-15 16:05:21 +02:00
parent 461d6b8bb6
commit 6ea7247613
4 changed files with 215 additions and 0 deletions

27
gitea/uninstall.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
. ./env.sh
if systemctl --user list-units --full --all | grep -q "${CONTAINER_PREFIX}-${CONTAINER_NAME}.service"; then
systemctl --user stop ${CONTAINER_PREFIX}-${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 ${CONTAINER_PREFIX}-$CONTAINER_NAME.service
rm $USER_SYSTEMD/${CONTAINER_PREFIX}-$CONTAINER_NAME.service
systemctl --user daemon-reload
# sudo rm -r $SERVICE_DIR
# crontab -l | grep -v "$VW_FOLDER/$BACKUP_FILE" | crontab -
echo "Uninstall complete. Manually run haproxy config to rebuild config. Manually remove data directory
- $GITEA_FOLDER
- $HOME/.local/backup/$CONTAINER_NAME
if needed."