Skip to content

Commit

Permalink
Do not overwrite custom user config
Browse files Browse the repository at this point in the history
  • Loading branch information
djarbz committed Oct 25, 2024
1 parent 4a30b02 commit 15ce87e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions kasmvnc/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,17 @@ if command -v sudo &> /dev/null && sudo -n true 2> /dev/null; then
else
kasm_config_file="$HOME/.vnc/kasmvnc.yaml"
SUDO=
mkdir -p "$HOME/.vnc"

echo "WARNING: Sudo access not available, using user config dir!"
echo "WARNING: This may prevent custom user KasmVNC settings from applying!"

if [[ -f "$kasm_config_file" ]]; then
echo "WARNING: Custom user KasmVNC config exists, not overwriting!"
echo "WARNIGN: Ensure that you manually configure the appropriate settings."
kasm_config_file="/dev/stderr"
else
echo "WARNING: This may prevent custom user KasmVNC settings from applying!"
mkdir -p "$HOME/.vnc"
fi
fi

echo "Writing KasmVNC config to $kasm_config_file"
Expand Down

0 comments on commit 15ce87e

Please sign in to comment.