Introducing ID to sz.env load, better handling of truenas specific code
This commit is contained in:
parent
f3bd0e804d
commit
18f047b9ca
5 changed files with 30 additions and 7 deletions
8
_home/private_dot_config/sz.env/ID_truenas_scale.env
Normal file
8
_home/private_dot_config/sz.env/ID_truenas_scale.env
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/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" ]
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue