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

#!/bin/sh
usertest() {
if test "$(id -u)" -eq 0; then
echo "You cannot run this script as root.";
exit 1;
fi
if ! (getent passwd junikim 2>&1) > /dev/null; then
echo "User junikim must exist.";
exit 1
fi
if ! (apk list | grep 'doas'); then
echo "doas is not installed.";
exit 1
fi
}
usertest
vbox() {
echo "Virtual Box stuff..."
doas apk add xf86-video-vboxvideo xf86-video-intel xf86-video-vesa \
xf86-input-synaptics virtualbox-guest-additions
doas rc-update add virtualbox-guest-additions
doas apk add dbus
doas rc-service dbus start
doas rc-update add dbus
doas rc-service udev start
doas rc-update add udev
}
vmware() {
echo "VMware stuff..."
doas apk add xf86-video-vboxvideo xf86-video-intel xf86-video-vesa \
xf86-input-synaptics open-vm-tools open-vm-tools-guestinfo \
open-vm-tools-deploypkg
doas rc-service open-vm-tools start
doas rc-update add open-vm-tools boot
doas apk add dbus
doas rc-service dbus start
doas rc-update add dbus
doas rc-service udev start
doas rc-update add udev
}
i3() {
doas apk add i3wm i3status dmenu
}
echo "setting up xorg and xfce desktop environment"
doas setup-xorg-base
doas apk add xfce4 xfce4-terminal firefox xrandr
#vbox
#vmware
cat <<EOF >> "$HOME/.xinitrc"
xrandr -s 1024x768
exec startxfce4
EOF
echo "You should probably restart"