Files
gott/deploy.sh
T

28 lines
603 B
Bash
Executable File

#!/bin/bash
set -e
_hostname=$(hostname)
if [ "$_hostname" = "stein2" ]; then
cd /home/node/.openclaw/workspace/projects/gott
systemctl stop gott
elif [ "$_hostname" = "meleki-container" ]; 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
if [ "$_hostname" = "stein2" ]; then
systemctl start gott
elif [ "$_hostname" = "meleki-container" ]; then
ssh -o ConnectTimeout=5 meleki@192.168.100.200 "nohup sudo systemctl restart gott > /dev/null 2>&1 &"
fi
echo "OK"