From 02e6489b74720bc58747265f399209c49bd8dccc Mon Sep 17 00:00:00 2001 From: jzwick-jama <129895583+jzwick-jama@users.noreply.github.com> Date: Fri, 9 Jun 2023 18:44:57 -0700 Subject: [PATCH] Update xrdp-install.sh Finished script --- ubuntu-setup/xrdp-install.sh | 43 +++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/ubuntu-setup/xrdp-install.sh b/ubuntu-setup/xrdp-install.sh index 44ff983..45b420d 100755 --- a/ubuntu-setup/xrdp-install.sh +++ b/ubuntu-setup/xrdp-install.sh @@ -1,18 +1,35 @@ #!/bin/bash function InstallXRDP() { - echo "Installing xrdp. Press enter to continue." - sudo apt install -y xrdp; - sudo systemctl status xrdp; - sudo adduser xrdp ssl-cert; - sudo systemctl restart xrdp; - echo "installation complete" + echo "Installing xrdp. Press enter to continue." + sudo apt install -y xrdp + echo "Installing xrdp. Press enter to continue." + sudo systemctl status xrdp + read -p "Did xrdp start? (Y/N) " didxrdpstart + case $didxrdpstart in + [Yy]) + #action + ;; + [Nn]) + #second action + ;; + Qq]) + exit + ;; + *) + echo "Invalid selection" + sleep 2 + InstallXRDP + ;; + esac + echo "Adding user xrdp to ssl-cert group..." + sudo adduser xrdp ssl-cert + echo "Restarting XRDP service..." + sudo systemctl restart xrdp + echo "installation complete" } -InstallXRDP - - -function WhileTrue() { - while true; then - -} \ No newline at end of file +while true; do + InstallXRDP + exit +done