first commit
This commit is contained in:
64
run.sh
Executable file
64
run.sh
Executable file
@@ -0,0 +1,64 @@
|
||||
#!/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, desktop or full-desktop profile ? (server/desktop/full-desktop)"
|
||||
read -p "> " answer
|
||||
echo "profile=$answer" > $config_file
|
||||
chmod +x $config_file
|
||||
case $answer in
|
||||
server)
|
||||
break
|
||||
;;
|
||||
desktop)
|
||||
break
|
||||
;;
|
||||
full-desktop)
|
||||
break
|
||||
;;
|
||||
* )
|
||||
echo "Please answer server/desktop/full-desktop."
|
||||
;;
|
||||
esac
|
||||
done
|
||||
./modules.sh
|
||||
|
||||
Reference in New Issue
Block a user