35 lines
840 B
Bash
Executable File
35 lines
840 B
Bash
Executable File
#!/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
|