home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

commit 55c8554a220c94b88f891d8d12fceec2e57af00e
parent 4eb1db4e2b7c3c37d156e1e6db35f3b3726c5048
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Wed,  6 Jul 2022 19:42:05 +0200

scripts: fix redhat-vpn on servers

If xset command is not available, set GRAPHICS to 0 as well.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Mnix/packages/my/scripts/bin/redhat-vpn | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/nix/packages/my/scripts/bin/redhat-vpn b/nix/packages/my/scripts/bin/redhat-vpn @@ -5,7 +5,9 @@ set -e GRAPHICS=1 -if ! timeout 1s xset q &>/dev/null; then +if ! command -v xset &> /dev/null; then + GRAPHICS=0 +elif ! timeout 1s xset q &>/dev/null; then GRAPHICS=0 fi