add service files, -it was unneeded here

This commit is contained in:
Ruben 2025-07-17 02:04:40 -05:00
commit d547279f8d
No known key found for this signature in database
GPG key ID: 8EA836555FB6D9A5
5 changed files with 31 additions and 1 deletions

View file

@ -268,7 +268,7 @@ function postgres_vacuum_self {
return 1 return 1
fi fi
# vacuum self # vacuum self
docker exec -it postgres-db-1 /bin/bash -c "psql -U postgres -c 'VACUUM ANALYZE;'" docker exec postgres-db-1 /bin/bash -c "psql -U postgres -c 'VACUUM ANALYZE;'"
# unset secrets # unset secrets
unset $(grep -v '^#' /etc/secrets/postgres.env | sed -E 's/(.*)=.*/\1/' | xargs) unset $(grep -v '^#' /etc/secrets/postgres.env | sed -E 's/(.*)=.*/\1/' | xargs)
} }

View file

@ -0,0 +1,6 @@
[Unit]
Description=helperbot backup command
[Service]
Type=oneshot
ExecStart=/usr/local/bin/helperbot --backup

View file

@ -0,0 +1,9 @@
[Unit]
Description=helperbot backup command
[Timer]
OnCalendar=daily
Persistent=true
[Install]
WantedBy=timers.target

View file

@ -0,0 +1,6 @@
[Unit]
Description=helperbot vacuum command
[Service]
Type=oneshot
ExecStart=/usr/local/bin/helperbot --vacuum

View file

@ -0,0 +1,9 @@
[Unit]
Description=helperbot vacuum command
[Timer]
OnBootSec=15min
OnUnitActiveSec=3d
[Install]
WantedBy=timers.target