| Current Path : /snap/lxd/38413/commands/ |
| Current File : //snap/lxd/38413/commands/daemon.reload |
#!/bin/sh
set -eu
# Re-exec outside of apparmor confinement
if [ -d /sys/kernel/security/apparmor ]; then
label="$(cat /proc/self/attr/current 2>/dev/null)"
if [ "$label" != "unconfined" ] && [ -n "${label##*(unconfined)}" ]; then
exec aa-exec -p unconfined -- "$0" "$@"
fi
fi
echo reload > "${SNAP_COMMON}/state"
read -r PID < "${SNAP_COMMON}/lxd.pid"
exec kill "$PID"