esac
+ # this section copied from servicepid()
+ unit=exim4
+ pid=$(systemctl show --property MainPID --value $unit ||:)
+ case $pid in
+ [1-9]*) : ;;
+ *)
+ dir=/sys/fs/cgroup/system.slice
+ if [[ ! -d $dir ]]; then
+ dir=/sys/fs/cgroup/systemd/system.slice
+ fi;
+ pid=$(head -n1 $dir/${unit%.service}.service/cgroup.procs ||:)
+ ;;
+ esac
+ if [[ ! $pid ]]; then
+ chars+=(EXIM)
+ fi
+
+
if [[ -e /a/bin/bash_unpublished/source-state ]]; then
# /a gets remounted due to btrbk, ignore error code for file doesnt exist
source /a/bin/bash_unpublished/source-state || [[ $? == 1 ]]
# allow failure in case there are no snapshots yet.
# shellcheck disable=SC2012
shopt -u nullglob
- files=(/mnt/root/btrbk/$vol.20*)
+ files=(/mnt/o/btrbk/$vol.20*)
shopt -s nullglob
snaps=()
if (( ${#files[@]} )); then
if [[ ! $last_emacs_check || $emacsfiles ]] || (( last_emacs_check < EPOCHSECONDS - 300 )); then
if pgrep -G iank -u iank -f 'emacs --daemon' &>/dev/null; then
# i dun care if this fails
- emacsfiles="$(timeout 1 emacsclient --eval "$elisp"| sed '/^"nil"$/d;s/^"(/E: /;s/)"$//' ||:)"
+ emacsfiles="$(timeout 1 emacsclient -a /usr/bin/true --eval "$elisp" 2>/dev/null | sed '/^"nil"$/d;s/^"(/E: /;s/)"$//' ||:)"
if [[ $emacsfiles ]]; then
chars+=("$emacsfiles")
fi
fi
wait=15
if ! $power; then
+ if systemctl -q is-active bitcoind; then
+ bitcoinoff
+ fi
wait=60
fi