mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-19 01:27:51 -05:00
chore(deploy): add OpenRC support and deployment helpers
Add OpenRC service and configuration files to support automated server updates on systems without systemd timers. - Add `deploy/update-loop.sh` to handle periodic updates for OpenRC. - Add `deploy/burrow-update.openrc` and `deploy/burrow-update.conf`. - Update `deploy/update.sh` to support both systemd and OpenRC service restarts. - Add `deploy/README.md` with installation instructions. - Update `.gitignore` to allow the deployment documentation.
This commit is contained in:
1 parent
9f69b3511b
commit
d20920dc3c
6 files changed
+105
-3
No files matched your search
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
# Runs update.sh repeatedly for init systems without a timer facility.
|
||||
set -u
|
||||
|
||||
interval=${BURROW_UPDATE_INTERVAL:-120}
|
||||
case "$interval" in
|
||||
''|*[!0-9]*)
|
||||
echo "BURROW_UPDATE_INTERVAL must be a positive number of seconds" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$interval" -eq 0 ]; then
|
||||
echo "BURROW_UPDATE_INTERVAL must be greater than zero" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
|
||||
while :; do
|
||||
# A failed fetch or rejected update should not stop future update attempts.
|
||||
"$script_dir/update.sh" || echo "burrow update failed; will retry in $interval seconds" >&2
|
||||
sleep "$interval"
|
||||
done
|
||||
Reference in new issue
Block a user