2023-02-16 12:57:06 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
|
|
dotnet_version='net6.0'
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
echo -e "\n============================ Build ============================\n"
|
|
|
|
|
|
|
|
dotnet publish \
|
|
|
|
./SaliMax.csproj \
|
|
|
|
-c Release \
|
2023-02-23 12:45:09 +00:00
|
|
|
-r linux-x64
|
2023-02-16 12:57:06 +00:00
|
|
|
|
|
|
|
echo -e "\n============================ Deploy ============================\n"
|
|
|
|
|
|
|
|
rsync -v \
|
2023-02-23 12:45:09 +00:00
|
|
|
./bin/Release/$dotnet_version/linux-x64/publish/* \
|
|
|
|
ie-entwicklung@10.2.3.49:~/salimax
|
|
|
|
|
|
|
|
|
|
|
|
# debian@10.2.1.87:~/salimax
|
|
|
|
|
|
|
|
echo -e "\n============================ Restart Salimax sevice ============================\n"
|
|
|
|
|
|
|
|
ssh -tt \
|
|
|
|
ie-entwicklung@10.2.3.49 \
|
|
|
|
sudo systemctl restart salimax.service
|
|
|
|
|
2023-02-16 12:57:06 +00:00
|
|
|
|
2023-02-23 12:45:09 +00:00
|
|
|
echo -e "\n============================ Print service output ============================\n"
|
2023-02-16 12:57:06 +00:00
|
|
|
|
|
|
|
ssh -tt \
|
2023-02-23 12:45:09 +00:00
|
|
|
ie-entwicklung@10.2.3.49 \
|
|
|
|
journalctl -f -u salimax.service
|
|
|
|
|
2023-02-16 12:57:06 +00:00
|
|
|
|