home · contact · privacy
Add old_server option to setup_server script.
[config] / buster / setup_scripts / setup_server.sh
1 #!/bin/sh
2 # Next setup steps for a server whose login policy has just been set from
3 # the outside via ./init_user_and_keybased_login.sh.
4 set -e
5
6 # Provide maximum input for set_hostname_and_fqdn.sh.
7 if [ "$#" -lt 2 ]; then
8     echo 'Need exactly two arguments (hostname, FQDN).'
9     false
10 fi
11 hostname="$1"
12 fqdn="$2"
13 additional_arg="$3"
14
15 # Set up system without user environment.
16 config_tree_prefix="${HOME}/config/buster"
17 setup_scripts_dir="${config_tree_prefix}/setup_scripts"
18 cd "${setup_scripts_dir}"
19 ./setup.sh "${hostname}" "${fqdn}" server "${additional_arg}"
20
21 # If we have not yet set the shell for user plom, ensure it here. This
22 # is mostly for convenience.
23 usermod -s /bin/bash plom
24
25 # Enable firewall.
26 systemctl enable nftables.service