mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
improved setup script
This commit is contained in:
parent
9cefbaf488
commit
d13f19834b
1 changed files with 7 additions and 4 deletions
|
@ -2,15 +2,14 @@
|
|||
|
||||
set -e
|
||||
|
||||
RECEIPENTS="stvogel@eonerc.rwth-aachen.de,mstevic@eonerc.rwth-aachen.de"
|
||||
FROM="Simulator2Simulator Server <acs@0l.de>"
|
||||
RECIPIENTS="stvogel@eonerc.rwth-aachen.de,mstevic@eonerc.rwth-aachen.de"
|
||||
|
||||
SERVER=tux.0l.de
|
||||
USER=acs
|
||||
|
||||
PORT=$(shuf -i 60000-65535 -n 1)
|
||||
|
||||
IP=$(curl -s http://ifconfig.me)
|
||||
IP=$(curl -s http://canihazip.com/s)
|
||||
|
||||
# check if system has net connectivity. otherwise die...
|
||||
ssh -q -o ConnectTimeout=2 $USER@$SERVER
|
||||
|
@ -21,7 +20,11 @@ ssh -f -N -L 25:localhost:25 $USER@$SERVER
|
|||
ssh -f -N -R $PORT:localhost:22 $USER@$SERVER
|
||||
|
||||
# send mail with notification about new node
|
||||
mail -s "New S2SS node alive: $IP ($HOSTNAME)" -a "From: $FROM" "$RECEIPENTS" <<EOF
|
||||
sendmail "$RECIPIENTS" <<EOF
|
||||
Subject: New S2SS node alive: $IP ($HOSTNAME)
|
||||
From: Simulator2Simulator Server <acs@0l.de>
|
||||
To: $(RECIPIENTS)
|
||||
|
||||
There's a new host with the S2SS LiveUSB Image running:
|
||||
|
||||
Reverse SSH tunnel port: $PORT
|
||||
|
|
Loading…
Add table
Reference in a new issue