#!/bin/bash
# Before an upgrade replaces the files: stop the running agent (it removes
# its rules). upgrade_callback brings the new version back; the connection
# marker on /run lets the agent reconnect by itself.

# shellcheck source=common
. "$(dirname "$0")/common"

log "upgrade_init"
systemctl stop "$UNIT" >>"$LOG" 2>&1
exit 0
