Skip to content

Commit

Permalink
Script 2.
Browse files Browse the repository at this point in the history
fcw-multipass.sh script
Clean up and put in warnings for disabling VPN before execution.
  • Loading branch information
Lexxie9952 committed Dec 12, 2023
1 parent 5ac1955 commit 350ccfe
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions fcw-multipass.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,31 @@
#!/bin/bash

destroy() {
echo "DESTROYING EXISTING FcW Virtual machine"
echo "**********************************************************"
echo "!!! REMEMBER TO DISABLE VPN BEFORE RUNNING THIS SCRIPT !!!"
echo "**********************************************************"
echo "!!! REMEMBER TO DISABLE VPN BEFORE RUNNING THIS SCRIPT !!!"
echo "**********************************************************"
echo "!!! REMEMBER TO DISABLE VPN BEFORE RUNNING THIS SCRIPT !!!"
echo "**********************************************************"
echo ""
echo "Destroying any existing fcw virtual machine..."
multipass delete fcw
multipass purge
echo "DO NOT WORRY IF THIS FAILS it means that you did not have a FcW Virtual Machine running"
echo "(This harmlessly fails if no fcw virtual machine running)"
}

create() {
multipass launch bionic -n fcw --memory 3G --disk 20G --cpus 2 --mount $(pwd):/home/ubuntu/freeciv-web
echo "======= STARTING FcW Installation ============"
echo ""
echo "================ Starting FCW Installation ================"
multipass exec fcw --working-directory /home/ubuntu/freeciv-web -- chmod +x scripts/install/install-multipass.sh
multipass exec fcw --working-directory /home/ubuntu/freeciv-web -- scripts/install/install-multipass.sh
echo "======= Installation complete ================"
echo "To complete the booting of FCW, please now do:"
echo "================ Installation complete ================"
echo "To finish, please execute:"
echo ""
echo "multipass shell fcw"
echo "./multipass-entrypoint.sh start"
echo ""
}

rebuild() {
Expand All @@ -36,4 +45,6 @@ destroy)
rebuild
esac

echo $'\a'

exit 0

0 comments on commit 350ccfe

Please sign in to comment.