Innovenergy_trunk/csharp/App/SaliMax/run (Salimax 0001).sh

35 lines
841 B
Bash
Raw Normal View History

2023-06-13 11:01:48 +00:00
#!/bin/bash
dotnet_version='net6.0'
2023-07-13 07:42:50 +00:00
salimax_ip='10.2.3.104'
2023-06-30 08:26:04 +00:00
username='ie-entwicklung'
2023-06-13 11:01:48 +00:00
set -e
echo -e "\n============================ Build ============================\n"
2023-07-13 07:42:50 +00:00
dotnet publish \
2023-06-13 11:01:48 +00:00
./SaliMax.csproj \
2023-07-13 07:42:50 +00:00
-p:PublishTrimmed=false \
2023-06-13 11:01:48 +00:00
-c Release \
2023-07-13 07:42:50 +00:00
-r linux-x64
2023-06-13 11:01:48 +00:00
echo -e "\n============================ Deploy ============================\n"
rsync -v \
./bin/Release/$dotnet_version/linux-x64/publish/* \
2023-07-13 07:42:50 +00:00
$username@$salimax_ip:~/salimax
2023-06-13 11:01:48 +00:00
echo -e "\n============================ Restart Salimax sevice ============================\n"
ssh -tt \
2023-07-13 07:42:50 +00:00
$username@$salimax_ip \
2023-06-13 11:01:48 +00:00
sudo systemctl restart salimax.service
echo -e "\n============================ Print service output ============================\n"
ssh -tt \
2023-07-13 07:42:50 +00:00
$username@$salimax_ip \
2023-06-13 11:01:48 +00:00
journalctl -f -u salimax.service