2 # Copyright (C) 2019 Ian Kelling
3 # SPDX-License-Identifier: AGPL-3.0-or-later
4 if [ -z "$BASH_VERSION" ]; then echo "error: shell is not bash" >&2; exit 1; fi
6 if [[ $EUID != 0 ]]; then s
=sudo
; fi
9 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
12 source /a
/bin
/bash_unpublished
/source-state
13 if [[ $HOSTNAME != "$MAIL_HOST" && $hn != li.b8.nz
&& ! $DISPLAY ]]; then
17 cmd
="$s /usr/sbin/checkrestart -p"
18 if [[ $
($cmd |
sed '/^Found 0 processes using old versions of upgraded files$/d' |
wc -l) != 0 ]]; then