dotfiles/_home/private_dot_config/sz.env/ID_truenas_scale.env

9 lines
265 B
Bash

#!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"'
function is_truenas() {
local TRUENAS_TARGET="truenas.target"
[ "$(systemctl get-default)" = "$TRUENAS_TARGET" ] \
&& [ "$(systemctl is-active "$TRUENAS_TARGET")" = "active" ]
}