Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/vbash
- # Made by Julian M
- # Three scripts for the VOIP-kings under the clouds,
- # Seven for the Math-lords in their halls of graphs,
- # Nine for Biking Men doomed to fall,
- # One for the Go Lord on his window-side throne
- # In the Land of telecom infrastructure where the Latency lies.
- # One Script to rule them all, One Script to find them,
- # One Script to tunnel them all and in the darkness traceroute them
- # In the Land of telecom infrastructure where the Latencies lie
- source /opt/vyatta/etc/functions/script-template
- createNewUser() {
- echo "Creating New User..."
- configure
- set system login user probe authentication plaintext-password $PASSWORD-REP
- set system login user probe level admin
- commit
- save
- }
- setOVPN() {
- echo "Setting up tunnel client"
- echo "$OVPN-REP" > "$OVPN-CN".ovpn
- mv "$OVPN-CN".ovpn /config/
- }
- setTunnel(){
- echo "setting up tunnel..."
- configure
- set interfaces openvpn vtun0 config-file /config/"$OVPN-CN".ovpn
- commit
- save
- }
- setUpRepo(){
- echo "setting up repo..."
- curl http://138.197.141.215/repo/conf/dbr.gpg.key | sudo apt-key add -
- configure
- set system package repository wheezy components 'main'
- set system package repository wheezy distribution wheezy
- set system package repository wheezy url http://138.197.141.215/repo
- commit
- save
- }
- installIve(){
- echo "installing ive..."
- sudo apt-get update
- sudo apt-get install ive
- }
- installProbeMonitor() {
- echo "installing probe mointor..."
- sudo apt-get install probemonitor
- }
- setupIve(){
- echo "setting up ive..."
- echo '$IVE-CONFIG' > ive.conf
- #sudo mkdir /etc/ive
- sudo mv ive.conf /etc/ive/
- ive
- }
- Cron() {
- echo "setting files"
- touch /etc/ive/ive.log
- sudo chmod 666 /etc/ive/ive.log
- echo "starting cron"
- crontab -u probe /etc/ive/ncrontab
- echo "done with cron"
- }
- createNewUser
- setOVPN
- setTunnel
- setUpRepo
- installIve
- setupIve
- Cron
- installProbeMonitor
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement