blob: 9affb9cad2ff1dbfb6aa63cc18d40d24001d9500 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/sh
# SPDX-License-Identifier: GPL-3.0-only
# SPDX-FileCopyrightText: 2026 Nicholas Rodrigues Lordello <[email protected]>
if [ "$(id -u)" -ne 0 ]; then
printf '%s: operation not permitted\n' "$0" >&2
exit 1
fi
if [ -x /etc/dbx/stop.local ]; then
/etc/dbx/stop.local ||
printf '%s: stop.local failed (%d)\n' "$0" "$?" >&2
fi
if ! pid="$(cat /run/dbx.pid)"; then
printf '%s: could not read init PID file, assuming 1\n' "$0" >&2
pid=1
fi
kill -TERM "$pid" ||
printf '%s: could not stop init[%s] (%d)\n' "$0" "$pid" "$?" >&2
|