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.

70 lines
1.4 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
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. vmware() {
  29. echo "VMware stuff..."
  30. doas apk add xf86-video-vboxvideo xf86-video-intel xf86-video-vesa \
  31. xf86-input-synaptics open-vm-tools open-vm-tools-guestinfo \
  32. open-vm-tools-deploypkg
  33. doas rc-service open-vm-tools start
  34. doas rc-update add open-vm-tools boot
  35. doas apk add dbus
  36. doas rc-service dbus start
  37. doas rc-update add dbus
  38. doas rc-service udev start
  39. doas rc-update add udev
  40. }
  41. i3() {
  42. doas apk add i3wm i3status dmenu
  43. }
  44. echo "setting up xorg and xfce desktop environment"
  45. doas setup-xorg-base
  46. doas apk add xfce4 xfce4-terminal firefox xrandr
  47. #vbox
  48. #vmware
  49. cat <<EOF >> "$HOME/.xinitrc"
  50. xrandr -s 1024x768
  51. exec startxfce4
  52. EOF
  53. echo "You should probably restart"