28 lines
627 B
Bash
Executable File
28 lines
627 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
_hostname=$(hostname)
|
|
|
|
if [ "$_hostname" = "stein2" ]; then
|
|
cd /home/node/.openclaw/workspace/projects/gott
|
|
elif [ "$_hostname" = "meleki" ]; then
|
|
cd ~/.openclaw/workspace/projects/gott
|
|
else
|
|
echo "$_hostname: deployment not allowed"
|
|
exit
|
|
fi
|
|
|
|
export PATH="$HOME/.dotnet:$PATH"
|
|
|
|
dotnet publish -c Release -o publish
|
|
cp wwwroot/index.html publish/wwwroot/index.html
|
|
|
|
if [ "$_hostname" = "stein2" ]; then
|
|
systemctl restart gott
|
|
elif [ "$_hostname" = "meleki" ]; then
|
|
ssh -o ConnectTimeout=5 meleki@192.168.100.200 "nohup sudo systemctl restart gott > /dev/null 2>&1 &"
|
|
fi
|
|
|
|
echo "Service restarted"
|