SMART custom notifications (to test)
This commit is contained in:
@@ -10,7 +10,7 @@ export GUM_SPIN_TITLE_BOLD=true
|
||||
NECESSARY_VARIABLES_LIST=("TARGET_HOST" "REMOTE_PASS" "SSH_PUBLIC_KEY" "DOMAIN_NAME" \
|
||||
"EMAIL_ADDRESS" "CF_DNS_API_TOKEN" "SENDER_EMAIL_ADDRESS" "SENDER_EMAIL_ADDRESS_PASSWORD" \
|
||||
"SENDER_EMAIL_DOMAIN" "SENDER_EMAIL_PORT" "HOME_ROUTER_SUBNET" "HOME_ROUTER_IP" \
|
||||
"HOME_SERVER_IP" "SELECTED_SERVICES")
|
||||
"HOME_SERVER_IP" "SELECTED_SERVICES" "SERVER_OWNER_NAME")
|
||||
### Default settings <--
|
||||
|
||||
user_input() {
|
||||
@@ -67,6 +67,7 @@ necessary_information() {
|
||||
user_input "DOMAIN_NAME" " Please provide the domain name (FQDN) your home server will use :" "For example : yourdomain.com" "${DOMAIN_REGEX}" "Invalid domain name format."
|
||||
user_input "EMAIL_ADDRESS" " Please provide a valid email address (will be used for ACME, and your services) :" "For example : myemail@gmail.com" "${EMAIL_REGEX}" "Invalid email address format."
|
||||
user_input "CF_DNS_API_TOKEN" " Please provide a cloudflare API token with DNS zone permission :" "For example : bA7hdvCOuXGytlNKohi3ZGtlVpf5CHpLuCMiJrE" "" "" "true"
|
||||
user_input "SERVER_OWNER_NAME" " Please provide the name of the server owner :" "For example : Steve" "" ""
|
||||
|
||||
echo -e "\n\n➡️ Some services will be able to send you emails. For that you need an email that supports sending emails (like Gmail for example)\n"
|
||||
# SMTP SETTINGS
|
||||
@@ -626,6 +627,7 @@ nix_generation() {
|
||||
cp -avu templates/nix-config/flake.nix final-nix-config/etc/nixos/
|
||||
cp -avu templates/nix-config/misc/* final-nix-config/etc/nixos/misc/
|
||||
|
||||
echo "${SERVER_OWNER_NAME:-User}" > final-nix-config/etc/numbus-server/owner
|
||||
echo -e "\n✅ Writing correct ips to configuration.nix..."
|
||||
sed -i "s|HOME_SERVER_IP|${HOME_SERVER_IP}|g" final-nix-config/etc/nixos/misc/networking.nix
|
||||
sed -i "s|HOME_ROUTER_IP|${HOME_ROUTER_IP}|g" final-nix-config/etc/nixos/misc/networking.nix
|
||||
@@ -712,6 +714,8 @@ export_configuration() {
|
||||
cp -avu templates/post-install/numbus-server.sh "$CONFIG_EXPORT_DIR"
|
||||
|
||||
echo "export TARGET_INTERFACE=\"${TARGET_INTERFACE}\"" >> $CONFIG_EXPORT_FILE
|
||||
echo -e "\n# SERVER SETTINGS" >> $CONFIG_EXPORT_FILE
|
||||
echo "export SERVER_OWNER_NAME=\"${SERVER_OWNER_NAME:-User}\"" >> $CONFIG_EXPORT_FILE
|
||||
echo -e "\n# DISK SETTINGS" >> $CONFIG_EXPORT_FILE
|
||||
echo "export BOOT_DISKS_ID=\"(${BOOT_DISKS_ID[@]})\"" >> $CONFIG_EXPORT_FILE
|
||||
echo "export DATA_DISKS_ID=\"(${DATA_DISKS_ID[@]})\"" >> $CONFIG_EXPORT_FILE
|
||||
|
||||
Reference in New Issue
Block a user