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.
 
 

28 lines
490 B

#!/bin/sh
# script must start at home directory
cd "$HOME" || exit 1;
#DIR="$(realpath "$(dirname "$0")")"
usertest() {
if test "$(id -u)" -ne 0; then
echo "You must run this script as root.";
exit 1;
fi
}
createjunikim() {
# create junikim
adduser -g "Juni Kim" junikim
adduser junikim video
adduser junikim input
adduser junikim wheel
}
installdoas() {
apk add doas
echo "permit persist :wheel" >> /etc/doas.conf
}
usertest && createjunikim && installdoas