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