9 lines
265 B
Bash
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" ]
|
||
|
}
|
||
|
|