X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=bullseye%2Fsetup_scripts%2Fsetup_server.sh;fp=bullseye%2Fsetup_scripts%2Fsetup_server.sh;h=a05db18d606a073486ff0fe3030eed77ceccb48b;hb=1045df34e06701e4ddd98869baa10bf466c9c455;hp=0000000000000000000000000000000000000000;hpb=276e00b18518697f3f528d05629cfe11c5fb4afc;p=config diff --git a/bullseye/setup_scripts/setup_server.sh b/bullseye/setup_scripts/setup_server.sh new file mode 100755 index 0000000..a05db18 --- /dev/null +++ b/bullseye/setup_scripts/setup_server.sh @@ -0,0 +1,26 @@ +#!/bin/sh +# Next setup steps for a server whose login policy has just been set from +# the outside via ./init_user_and_keybased_login.sh. +set -e + +# Provide maximum input for set_hostname_and_fqdn.sh. +if [ "$#" -lt 2 ]; then + echo 'Need exactly two arguments (hostname, FQDN).' + false +fi +hostname="$1" +fqdn="$2" +additional_arg="$3" + +# Set up system without user environment. +config_tree_prefix="${HOME}/config/bullseye" +setup_scripts_dir="${config_tree_prefix}/setup_scripts" +cd "${setup_scripts_dir}" +./setup.sh "${hostname}" "${fqdn}" server "${additional_arg}" + +# If we have not yet set the shell for user plom, ensure it here. This +# is mostly for convenience. +usermod -s /bin/bash plom + +# Enable firewall. +systemctl enable nftables.service