Advertisement
Guest User

update-server.sh

a guest
Jul 25th, 2014
429
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.75 KB | None | 0 0
  1.    
  2.  
  3.     #!/bin/bash
  4.     GNS3_DIR="$HOME/GNS3/src"
  5.     if [[ ! -d "$GNS3_DIR" ]]; then
  6.         echo "Please wait, setting up GNS3 server"
  7.         mkdir -p "$GNS3_DIR"
  8.         git clone -q --branch=master git://github.com/GNS3/gns3-server.git $GNS3_DIR/gns3-server
  9.         cd $GNS3_DIR/gns3-server
  10.         python3 setup.py -q install > /dev/null 2<&1
  11.         echo "GNS3 server installed successfully"
  12.     elif [[ -d "$GNS3_DIR" ]] && [[ -n "$(ls -A $GNS3_DIR/gns3-server/.git)" ]]; then
  13.         echo "Please wait, updating GNS3 server"
  14.         pip uninstall gns3-server -y -q
  15.         cd $GNS3_DIR/gns3-server
  16.         git pull origin master
  17.         python3 setup.py -q install > /dev/null 2<&1
  18.         echo "GNS3 server updated successfully"
  19.     fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement