#!/bin/bash # If root ID=$(id -u) if [ "$ID" -ne 0 ] then echo echo "Please run as root !" exit fi # Check network if ! ping -q -c 3 -W 5 kernel.org >/dev/null then echo echo "The network is down, check your connection." exit fi # Welcome message echo echo "Welcome to NETbian Debian post-installation script !" echo echo " => Profile selection" echo # Configuration file export config_file="/etc/netbian.conf" # Check for existing config if [ -f $config_file ]; then source $config_file if [ ! -z $profile ]; then echo "Profile is already set as $profile." export config=done ./modules.sh exit fi fi # Profile selection while true do echo "Do you want to install the server or desktop profile ? (server/desktop)" read -p "> " answer echo "profile=$answer" > $config_file chmod +x $config_file case $answer in server) break ;; desktop) break ;; * ) echo "Please answer server/desktop." ;; esac done ./modules.sh