Skip to content

Commit

Permalink
Restructure. Resolves #6 (although that was already resolved a while …
Browse files Browse the repository at this point in the history
…ago)
  • Loading branch information
brhahlen committed Jan 20, 2021
1 parent d41638e commit 34b7d9a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions dc
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,11 @@ function pull(){

# NETWORK
function network(){
echo "This function will create the macvlan network, create an interface, routes so the services can access each other, and makes the interface and routes permanent."
# Check for root access
if [[ $EUID -ne 0 ]]; then
echo "This function must be run using root privileges (using sudo)"
exit 1
fi echo "This function will create the macvlan network, create an interface, routes so the services can access each other, and makes the interface and routes permanent."
echo "You need to be root, or use sudo, to execute this function"
# Ensure that they want to continue
read -p "Do you wish to continue? " -n 1 -r
Expand All @@ -273,11 +277,6 @@ function network(){
then
exit 1
fi
# Check for root access
if [[ $EUID -ne 0 ]]; then
echo "This function must be run using root privileges (using sudo)"
exit 1
fi
echo "Creating the MACVLAN network"
echo "docker network create -d macvlan \
-o parent=enp0s31f6 \
Expand Down

0 comments on commit 34b7d9a

Please sign in to comment.