#!/bin/bash # ./deply_appout.sh ip port if [ $# -ne 2 ]; then echo "Usage: $0 ip port" exit 1 fi IP=$1 PORT=$2 echo "IP: $IP" echo "PORT: $PORT" aarch64-linux-gnu-strip ./build/app/app.out ssh -p $PORT root@$IP "systemctl stop zapp" ssh -p $PORT root@$IP "rm -rf /app/html" ssh -p $PORT root@$IP "rm -rf /app/app.out" scp -P $PORT build/app/app.out root@$IP:/app/ scp -P $PORT -r html/ root@$IP:/app/html ssh -p $PORT root@$IP "systemctl start zapp"