1 parent
22ffa41d31
commit
5a52286309
2 files changed
+24
No files matched your search
@@ -38,9 +38,15 @@ Description=Run dokku-retire.service every 5 minutes
|
|||||||
|
|
||||||
[Timer]
|
[Timer]
|
||||||
OnCalendar=*:0/5
|
OnCalendar=*:0/5
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
||||||
EOF
|
EOF
|
||||||
if command -v systemctl &>/dev/null; then
|
if command -v systemctl &>/dev/null; then
|
||||||
systemctl --quiet reenable dokku-retire
|
systemctl --quiet reenable dokku-retire
|
||||||
|
systemctl --quiet enable dokku-retire.timer
|
||||||
|
systemctl --quiet start dokku-retire.timer
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
cat <<EOF >/etc/cron.d/dokku-retire
|
cat <<EOF >/etc/cron.d/dokku-retire
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bats
|
||||||
|
|
||||||
|
load test_helper
|
||||||
|
|
||||||
|
setup() {
|
||||||
|
global_setup
|
||||||
|
}
|
||||||
|
|
||||||
|
teardown() {
|
||||||
|
global_teardown
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "(scheduler-docker-local) timer installed" {
|
||||||
|
run /bin/bash -c "systemctl list-timers | grep dokku-retire"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
}
|
||||||
Reference in new issue
Block a user