add service files, -it was unneeded here
This commit is contained in:
parent
4e54419a7e
commit
d547279f8d
5 changed files with 31 additions and 1 deletions
|
|
@ -268,7 +268,7 @@ function postgres_vacuum_self {
|
|||
return 1
|
||||
fi
|
||||
# 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 $(grep -v '^#' /etc/secrets/postgres.env | sed -E 's/(.*)=.*/\1/' | xargs)
|
||||
}
|
||||
|
|
|
|||
6
phosphorus/etc/systemd/system/helperbot-backup.service
Normal file
6
phosphorus/etc/systemd/system/helperbot-backup.service
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[Unit]
|
||||
Description=helperbot backup command
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/bin/helperbot --backup
|
||||
9
phosphorus/etc/systemd/system/helperbot-backup.timer
Normal file
9
phosphorus/etc/systemd/system/helperbot-backup.timer
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=helperbot backup command
|
||||
|
||||
[Timer]
|
||||
OnCalendar=daily
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
6
phosphorus/etc/systemd/system/helperbot-vacuum.service
Normal file
6
phosphorus/etc/systemd/system/helperbot-vacuum.service
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[Unit]
|
||||
Description=helperbot vacuum command
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/bin/helperbot --vacuum
|
||||
9
phosphorus/etc/systemd/system/helperbot-vacuum.timer
Normal file
9
phosphorus/etc/systemd/system/helperbot-vacuum.timer
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=helperbot vacuum command
|
||||
|
||||
[Timer]
|
||||
OnBootSec=15min
|
||||
OnUnitActiveSec=3d
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue