installation scripts for servers.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
878 B

3 years ago
3 years ago
3 years ago
  1. #!/bin/sh
  2. usertest() {
  3. if test "$(id -u)" -eq 0; then
  4. echo "You cannot run this script as root.";
  5. exit 1;
  6. fi
  7. if ! (getent passwd junikim 2>&1) > /dev/null; then
  8. echo "User junikim must exist.";
  9. exit 1
  10. fi
  11. if ! (apk list | grep 'doas'); then
  12. echo "doas is not installed.";
  13. exit 1
  14. fi
  15. }
  16. usertest
  17. vbox() {
  18. echo "Virtual Box stuff..."
  19. doas apk add xf86-video-vboxvideo xf86-video-intel xf86-video-vesa \
  20. xf86-input-synaptics virtualbox-guest-additions
  21. doas rc-update add virtualbox-guest-additions
  22. doas apk add dbus
  23. doas rc-service dbus start
  24. doas rc-update add dbus
  25. doas rc-service udev start
  26. doas rc-update add udev
  27. }
  28. echo "setting up xorg and xfce desktop environment"
  29. doas setup-xorg-base
  30. apk add xfce4 xfce4-terminal firefox
  31. vbox
  32. echo "exec startxfce4" >> "$HOME/.xinitrc"
  33. echo "You should probably restart"