feat(wg): install + enable the WireGuard status collector timer
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>feat/v1-foundation
parent
3d73489717
commit
9aabd7fce5
10
install.sh
10
install.sh
|
|
@ -288,6 +288,7 @@ install_host_watchers() {
|
|||
local tmp_path tmp_svc tmp_upath tmp_usvc
|
||||
tmp_path="$(mktemp)"; tmp_svc="$(mktemp)"; tmp_upath="$(mktemp)"; tmp_usvc="$(mktemp)"
|
||||
local tmp_gate; tmp_gate="$(mktemp)"
|
||||
local tmp_csvc tmp_ctimer; tmp_csvc="$(mktemp)"; tmp_ctimer="$(mktemp)"
|
||||
# Restart units run as the clusev user.
|
||||
sed "s#/home/nexxo/clusev#${proj}#g" "${src}/clusev-restart.path" > "$tmp_path"
|
||||
sed -e "s#/home/nexxo/clusev#${proj}#g" -e "s/^User=.*/User=clusev/" "${src}/clusev-restart.service" > "$tmp_svc"
|
||||
|
|
@ -296,20 +297,25 @@ install_host_watchers() {
|
|||
sed "s#/home/nexxo/clusev#${proj}#g" "${src}/clusev-update.service" > "$tmp_usvc"
|
||||
# Gate unit keeps User=root; only the path is rewritten.
|
||||
sed "s#/home/nexxo/clusev#${proj}#g" "docker/wg/clusev-wg-gate.service" > "$tmp_gate"
|
||||
sed "s#/home/nexxo/clusev#${proj}#g" "docker/wg/clusev-wg-collect.service" > "$tmp_csvc"
|
||||
sed "s#/home/nexxo/clusev#${proj}#g" "docker/wg/clusev-wg-collect.timer" > "$tmp_ctimer"
|
||||
if install -m 0644 "$tmp_path" "${dst}/clusev-restart.path" \
|
||||
&& install -m 0644 "$tmp_svc" "${dst}/clusev-restart.service" \
|
||||
&& install -m 0644 "$tmp_upath" "${dst}/clusev-update.path" \
|
||||
&& install -m 0644 "$tmp_usvc" "${dst}/clusev-update.service" \
|
||||
&& install -m 0644 "$tmp_gate" "${dst}/clusev-wg-gate.service" \
|
||||
&& install -m 0644 "$tmp_csvc" "${dst}/clusev-wg-collect.service" \
|
||||
&& install -m 0644 "$tmp_ctimer" "${dst}/clusev-wg-collect.timer" \
|
||||
&& systemctl daemon-reload \
|
||||
&& systemctl enable --now clusev-restart.path \
|
||||
&& systemctl enable --now clusev-update.path \
|
||||
&& systemctl enable clusev-wg-gate.service; then
|
||||
&& systemctl enable clusev-wg-gate.service \
|
||||
&& systemctl enable --now clusev-wg-collect.timer; then
|
||||
info "Host-Watcher aktiv (clusev-restart.path User=clusev, clusev-update.path User=root)"
|
||||
else
|
||||
warn "Host-Watcher konnten nicht installiert werden — siehe ${src}/README.md."
|
||||
fi
|
||||
rm -f "$tmp_path" "$tmp_svc" "$tmp_upath" "$tmp_usvc" "$tmp_gate"
|
||||
rm -f "$tmp_path" "$tmp_svc" "$tmp_upath" "$tmp_usvc" "$tmp_gate" "$tmp_csvc" "$tmp_ctimer"
|
||||
}
|
||||
install_host_watchers
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue