Skip to content

Commit

Permalink
Update interactive_setup.sh (#563)
Browse files Browse the repository at this point in the history
Fix mv-br5.network filename and clean up some typos/leftovers
  • Loading branch information
pedropombeiro authored Aug 8, 2023
1 parent 0874c3f commit e6e48d6
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions nspawn-container/interactive_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
# The process involves installing systemd-container and debootstrap and using them to create
# a base debian system in /data/custom/machines directory.
#Author : Apo-mak
#Last Date Edited : 09-04-2023
#Last Date Edited : 09-06-2023
###################################################################

set -e

dnsfile="10-dns.sh"
container_name="debian-custom"
container_root_pasword="12345678"

Expand Down Expand Up @@ -67,27 +66,27 @@ function echo_variables(){

}

function create_custom_ontainer_simple(){
function create_custom_container_simple(){
echo "You have selected to setup a container that has access to all the host network
interfaces and full capabilities to do anything to the system"
read -p "Press enter to continue OR ctrl + c to cancel."
create_custom_ontainer ;
create_custom_container ;
setup_networking_simple ;
setup_persistence ;
setup_backup_dpkg_files
}

function create_custom_ontainer_macvlan(){
echo "You have selected to setup a container to use an Isolated MacVLAN Network AKA Vlan."
function create_custom_container_macvlan(){
echo "You have selected to setup a container to use an Isolated MacVLAN Network AKA Vlan."
read -p "Press enter to continue OR ctrl + c to cancel."
create_custom_ontainer ;
create_custom_container ;
setup_networking_MACVLAN ;
setup_persistence ;
setup_backup_dpkg_files
}


function create_custom_ontainer() {
function create_custom_container() {
echo ""
echo " Creating a Custom Container on UnifiOS 3.x"
echo ""
Expand All @@ -96,7 +95,7 @@ function create_custom_ontainer() {

if [ -d "/data/custom/machines/$container_name" ]
then
echo "Directory /data/custom/machines/$container_name already exists... aborting the setup ...
echo "Directory /data/custom/machines/$container_name already exists... aborting the setup ...
try manual setup or setup with new container name."
exit 1
fi
Expand Down Expand Up @@ -191,7 +190,7 @@ EOF
#####Configure your container to set the IP and gateway you defined in 10-setup-network.sh
cd /data/custom/machines/"$container_name"/etc/systemd/network

cat <<EOF > mv-br5.network
cat <<EOF > mv-br${vlan_id}.network
[Match]
Name=mv-br$vlan_id
Expand Down Expand Up @@ -266,8 +265,8 @@ $(ColorGreen '0)') Exit
$(ColorBlue 'Choose an option:') "
read a
case $a in
1) create_custom_ontainer_simple ; menu ;;
2) create_custom_ontainer_macvlan ; menu ;;
1) create_custom_container_simple ; menu ;;
2) create_custom_container_macvlan ; menu ;;
3) setup_adguard ; menu ;;
4) echo_variables ; menu ;;
5) set_variables ; menu ;;
Expand All @@ -278,4 +277,4 @@ $(ColorBlue 'Choose an option:') "
}

# Call the menu function
menu
menu

0 comments on commit e6e48d6

Please sign in to comment.