You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

27 lines
468 B

#!/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"