Commit 55c8554a220c

Vincent Demeester <vincent@sbr.pm>
2022-07-06 19:42:05
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>
1 parent 4eb1db4
Changed files (1)
nix
packages
my
scripts
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