desk_check.sh 292 B

12345678910
  1. #!/bin/bash
  2. __check_desktop() {
  3. if [ `(dpkg-query -W -f='${Status}' ubuntu-desktop 2>/dev/null | grep -c "ok installed")` -eq 1 ]; then
  4. echo "Ubuntu Server is required, but it appears that you are running Ubuntu Desktop"
  5. exit 1
  6. fi
  7. }
  8. # Now just call the function:
  9. __check_desktop