diff --git a/csharp/App/SaliMax/HostList.sh b/csharp/App/SaliMax/HostList.sh new file mode 100755 index 000000000..2d493c965 --- /dev/null +++ b/csharp/App/SaliMax/HostList.sh @@ -0,0 +1,6 @@ + +Prototype ie-entwicklung@10.2.3.115 +Salimax001 ie-entwicklung@10.2.3.104 +Salimax002 ie-entwicklung@10.2.4.29 +Salimax003 ie-entwicklung@10.2.4.33 +Salimax004 ie-entwicklung@10.2.4.32 \ No newline at end of file diff --git a/csharp/App/SaliMax/run (Salimax0002).sh b/csharp/App/SaliMax/deploy.sh old mode 100644 new mode 100755 similarity index 55% rename from csharp/App/SaliMax/run (Salimax0002).sh rename to csharp/App/SaliMax/deploy.sh index 44b8fe549..b55e6e141 --- a/csharp/App/SaliMax/run (Salimax0002).sh +++ b/csharp/App/SaliMax/deploy.sh @@ -1,7 +1,7 @@ #!/bin/bash dotnet_version='net6.0' -salimax_ip='10.2.4.29' +salimax_ip="$1" username='ie-entwicklung' set -e @@ -20,15 +20,3 @@ rsync -v \ ./bin/Release/$dotnet_version/linux-x64/publish/* \ $username@$salimax_ip:~/salimax -echo -e "\n============================ Restart Salimax sevice ============================\n" - -ssh -tt \ - $username@$salimax_ip \ - sudo systemctl restart salimax.service - - -echo -e "\n============================ Print service output ============================\n" - -ssh -tt \ - $username@$salimax_ip \ - journalctl -f -u salimax.service \ No newline at end of file diff --git a/csharp/App/SaliMax/run (Salimax 0001).sh b/csharp/App/SaliMax/run (Salimax 0001).sh deleted file mode 100755 index c54c82e6f..000000000 --- a/csharp/App/SaliMax/run (Salimax 0001).sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -dotnet_version='net6.0' -salimax_ip='10.2.3.104' -username='ie-entwicklung' - -set -e - -echo -e "\n============================ Build ============================\n" - -dotnet publish \ - ./SaliMax.csproj \ - -p:PublishTrimmed=false \ - -c Release \ - -r linux-x64 - -echo -e "\n============================ Deploy ============================\n" - -rsync -v \ - ./bin/Release/$dotnet_version/linux-x64/publish/* \ - $username@$salimax_ip:~/salimax - -echo -e "\n============================ Restart Salimax sevice ============================\n" - -ssh -tt \ - $username@$salimax_ip \ - sudo systemctl restart salimax.service - - -echo -e "\n============================ Print service output ============================\n" - -ssh -tt \ - $username@$salimax_ip \ - journalctl -f -u salimax.service diff --git a/csharp/App/SaliMax/run (Salimax0003).sh b/csharp/App/SaliMax/run (Salimax0003).sh deleted file mode 100644 index a47112ee4..000000000 --- a/csharp/App/SaliMax/run (Salimax0003).sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -dotnet_version='net6.0' -salimax_ip='10.2.4.33' -username='ie-entwicklung' - -set -e - -echo -e "\n============================ Build ============================\n" - -dotnet publish \ - ./SaliMax.csproj \ - -p:PublishTrimmed=false \ - -c Release \ - -r linux-x64 - -echo -e "\n============================ Deploy ============================\n" - -rsync -v \ - ./bin/Release/$dotnet_version/linux-x64/publish/* \ - $username@$salimax_ip:~/salimax - -echo -e "\n============================ Restart Salimax sevice ============================\n" - -ssh -tt \ - $username@$salimax_ip \ - sudo systemctl restart salimax.service - - -echo -e "\n============================ Print service output ============================\n" - -ssh -tt \ - $username@$salimax_ip \ - journalctl -f -u salimax.service \ No newline at end of file diff --git a/csharp/App/SaliMax/run (SalimnaxProto Meiringen).sh b/csharp/App/SaliMax/run (SalimnaxProto Meiringen).sh deleted file mode 100755 index d2ed6e95d..000000000 --- a/csharp/App/SaliMax/run (SalimnaxProto Meiringen).sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -dotnet_version='net6.0' -salimax_ip='10.2.3.115' -username='ie-entwicklung' - -set -e - -echo -e "\n============================ Build ============================\n" - -dotnet publish \ - ./SaliMax.csproj \ - -p:PublishTrimmed=false \ - -c Release \ - -r linux-x64 - -echo -e "\n============================ Deploy ============================\n" - -rsync -v \ - ./bin/Release/$dotnet_version/linux-x64/publish/* \ - $username@$salimax_ip:~/salimax - -echo -e "\n============================ Restart Salimax sevice ============================\n" - -ssh -tt \ - $username@$salimax_ip \ - sudo systemctl restart salimax.service - - -echo -e "\n============================ Print service output ============================\n" - -ssh -tt \ - $username@$salimax_ip \ - journalctl -f -u salimax.service diff --git a/csharp/App/SaliMax/tunnels.html b/csharp/App/SaliMax/tunnels.html deleted file mode 100644 index 42c64fa50..000000000 --- a/csharp/App/SaliMax/tunnels.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - Tunnels - - - -
- Inverter
- DCDC
- Emu Meter
- ADAM
- AMPT
-
- - - \ No newline at end of file diff --git a/csharp/App/SaliMax/tunnelsToProto.sh b/csharp/App/SaliMax/tunnelsToProto.sh deleted file mode 100755 index 0a136e54b..000000000 --- a/csharp/App/SaliMax/tunnelsToProto.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -host=ie-entwicklung@10.2.3.115 - -tunnel() { - name=$1 - ip=$2 - rPort=$3 - lPort=$4 - - echo -n "localhost:$lPort $name " - ssh -nNTL "$lPort:$ip:$rPort" "$host" 2> /dev/null & - - until nc -vz 127.0.0.1 $lPort 2> /dev/null - do - echo -n . - sleep 0.3 - done - - echo "ok" -} - -echo "" - -tunnel "Trumpf Inverter (http) " 10.0.2.1 80 8001 -tunnel "Trumpf DCDC (http) " 10.0.3.1 80 8002 -tunnel "Ext Emu Meter (http) " 10.0.4.1 80 8003 -tunnel "Int Emu Meter (http) " 10.0.4.2 80 8004 -tunnel "AMPT (http) " 10.0.5.1 8080 8005 - -tunnel "Trumpf Inverter (modbus)" 10.0.2.1 502 5001 -tunnel "Trumpf DCDC (modbus) " 10.0.3.1 502 5002 -tunnel "Ext Emu Meter (modbus) " 10.0.4.1 502 5003 -tunnel "Int Emu Meter " 10.0.4.2 502 5004 -tunnel "AMPT (modbus) " 10.0.5.1 502 5005 -tunnel "Adam " 10.0.1.1 502 5006 -tunnel "Batteries " 127.0.0.1 6855 5007 - - -echo -echo "press any key to close the tunnels ..." -read -r -n 1 -s -kill $(jobs -p) -echo "done" diff --git a/csharp/App/SaliMax/tunnelstoSalimax0002.sh b/csharp/App/SaliMax/tunnelstoSalimax0002.sh deleted file mode 100755 index 98cd400bd..000000000 --- a/csharp/App/SaliMax/tunnelstoSalimax0002.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -host=ie-entwicklung@10.2.4.29 - -tunnel() { - name=$1 - ip=$2 - rPort=$3 - lPort=$4 - - echo -n "localhost:$lPort $name " - ssh -nNTL "$lPort:$ip:$rPort" "$host" 2> /dev/null & - - until nc -vz 127.0.0.1 $lPort 2> /dev/null - do - echo -n . - sleep 0.3 - done - - echo "ok" -} - -echo "" - -tunnel "Trumpf Inverter (http) " 10.0.2.1 80 9001 -tunnel "Trumpf DCDC (http) " 10.0.3.1 80 9002 -tunnel "Ext Emu Meter (http) " 10.0.4.1 80 9003 -tunnel "Int Emu Meter (http) " 10.0.4.2 80 9004 -tunnel "AMPT (http) " 10.0.5.1 8080 9005 - -#tunnel "Trumpf Inverter (modbus)" 10.0.2.1 502 3001 -#tunnel "Trumpf DCDC (modbus) " 10.0.3.1 502 3002 -#tunnel "Ext Emu Meter (modbus) " 10.0.4.1 502 3003 -#tunnel "Int Emu Meter " 10.0.4.2 502 3004 -#tunnel "AMPT (modbus) " 10.0.5.1 502 3005 -#tunnel "Batteries " 127.0.0.1 6855 3007 - - -echo -echo "press any key to close the tunnels ..." -read -r -n 1 -s -kill $(jobs -p) -echo "done" diff --git a/csharp/App/SaliMax/tunnelstoSalimax0003.sh b/csharp/App/SaliMax/tunnelstoSalimax0003.sh deleted file mode 100755 index a5e184247..000000000 --- a/csharp/App/SaliMax/tunnelstoSalimax0003.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -host=ie-entwicklung@10.2.4.33 - -tunnel() { - name=$1 - ip=$2 - rPort=$3 - lPort=$4 - - echo -n "localhost:$lPort $name " - ssh -nNTL "$lPort:$ip:$rPort" "$host" 2> /dev/null & - - until nc -vz 127.0.0.1 $lPort 2> /dev/null - do - echo -n . - sleep 0.3 - done - - echo "ok" -} - -echo "" - -tunnel "Trumpf Inverter (http) " 10.0.2.1 80 6001 -tunnel "Trumpf DCDC (http) " 10.0.3.1 80 6002 -tunnel "Ext Emu Meter (http) " 10.0.4.1 80 6003 -tunnel "Int Emu Meter (http) " 10.0.4.2 80 6004 -tunnel "AMPT (http) " 10.0.5.1 8080 6005 - -tunnel "Trumpf Inverter (modbus)" 10.0.2.1 502 3001 -tunnel "Trumpf DCDC (modbus) " 10.0.3.1 502 3002 -tunnel "Ext Emu Meter (modbus) " 10.0.4.1 502 3003 -tunnel "Int Emu Meter " 10.0.4.2 502 3004 -tunnel "AMPT (modbus) " 10.0.5.1 502 3005 -tunnel "Batteries " 127.0.0.1 6855 3007 - - -echo -echo "press any key to close the tunnels ..." -read -r -n 1 -s -kill $(jobs -p) -echo "done" diff --git a/csharp/App/SaliMax/tunnelstoSalimax0001.sh b/csharp/App/SaliMax/tunnelstoSalimaxX.sh similarity index 67% rename from csharp/App/SaliMax/tunnelstoSalimax0001.sh rename to csharp/App/SaliMax/tunnelstoSalimaxX.sh index 8b5fb2697..b3676d486 100755 --- a/csharp/App/SaliMax/tunnelstoSalimax0001.sh +++ b/csharp/App/SaliMax/tunnelstoSalimaxX.sh @@ -1,6 +1,6 @@ #!/bin/bash -host=ie-entwicklung@10.2.3.104 +host="ie-entwicklung@$1" tunnel() { name=$1 @@ -27,17 +27,14 @@ tunnel "Trumpf DCDC (http) " 10.0.3.1 80 7002 tunnel "Ext Emu Meter (http) " 10.0.4.1 80 7003 tunnel "Int Emu Meter (http) " 10.0.4.2 80 7004 tunnel "AMPT (http) " 10.0.5.1 8080 7005 +tunnel "Doepke (http) " 10.0.6.1 80 7006 - -tunnel "Trumpf Inverter (modbus)" 10.0.2.1 502 4001 -tunnel "Trumpf DCDC (modbus) " 10.0.3.1 502 4002 -tunnel "Ext Emu Meter (modbus) " 10.0.4.1 502 4003 -tunnel "Int Emu Meter " 10.0.4.2 502 4004 -tunnel "AMPT (modbus) " 10.0.5.1 502 4005 -tunnel "Adam " 10.0.1.1 502 4006 +tunnel "Trumpf Inverter (modbus)" 10.0.2.1 502 5001 +tunnel "Trumpf DCDC (modbus) " 10.0.3.1 502 5002 +tunnel "Ext Emu Meter (modbus) " 10.0.4.1 502 5003 +tunnel "Int Emu Meter " 10.0.4.2 502 5004 +tunnel "AMPT (modbus) " 10.0.5.1 502 5005 tunnel "Batteries " 127.0.0.1 6855 5007 - - echo