From 6df9396e830f03985dd5e888651e93d7b77465f0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 16 Mar 2021 22:18:44 +0000 Subject: [PATCH] Optionally use parameter as password --- install-desktop-client | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/install-desktop-client b/install-desktop-client index 9381486ed..5e78834b0 100755 --- a/install-desktop-client +++ b/install-desktop-client @@ -104,11 +104,15 @@ fi { echo '#!/bin/bash'; echo 'cd ~/.epicyon'; - echo "PASSWORD=\$(zenity --width=400 --password --title \"Epicyon Desktop Client\")"; - echo "if [ ! \"\$PASSWORD\" ]; then"; - echo " zenity --warning --width=400 --text \"No password was given\""; - echo ' exit 3'; - echo 'fi'; + echo "if [ \"\$1\" ]; then"; + echo " PASSWORD=\"\$1\""; + echo 'else'; + echo " PASSWORD=\$(zenity --width=400 --password --title \"Epicyon Desktop Client\")"; + echo " if [ ! \"\$PASSWORD\" ]; then"; + echo " zenity --warning --width=400 --text \"No password was given\""; + echo ' exit 3'; + echo ' fi'; + echo 'fi'; echo "python3 epicyon.py --desktop ${HANDLE} --password \"\$PASSWORD\""; } > ~/epicyon-client chmod +x ~/epicyon-client