stats: fix role-name quoting in the stats migration grants; add deploy/stats-collector (systemd user timers for CBS, Eurostat, FRED, BIS)
All checks were successful
Deploy production / deploy (push) Successful in 1m15s
All checks were successful
Deploy production / deploy (push) Successful in 1m15s
This commit is contained in:
20
deploy/stats-collector/install.sh
Normal file
20
deploy/stats-collector/install.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
# Install the /stats collector on the host as systemd user units (run as stan on stan-ovh):
|
||||
# the runner script, the stats-collector@.service template and one timer per source.
|
||||
# bash deploy/stats-collector/install.sh install + enable every timer
|
||||
# bash deploy/stats-collector/install.sh --no-enable install only
|
||||
set -euo pipefail
|
||||
here="$(cd "$(dirname "$0")" && pwd)"
|
||||
units="$HOME/.config/systemd/user"
|
||||
install -D -m 755 "$here/stats-collector-run.sh" "$HOME/.local/bin/stats-collector-run.sh"
|
||||
install -D -m 644 "$here/stats-collector@.service" "$units/stats-collector@.service"
|
||||
timers=()
|
||||
for timer in "$here"/stats-*.timer; do
|
||||
install -m 644 "$timer" "$units/$(basename "$timer")"
|
||||
timers+=("$(basename "$timer")")
|
||||
done
|
||||
systemctl --user daemon-reload
|
||||
if [ "${1:-}" != --no-enable ]; then
|
||||
systemctl --user enable --now "${timers[@]}"
|
||||
fi
|
||||
systemctl --user list-timers --no-pager 'stats-*'
|
||||
Reference in New Issue
Block a user