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

8 months ago
9 months ago
  1. #!/bin/bash
  2. # ./deply_appout.sh ip port
  3. if [ $# -ne 2 ]; then
  4. echo "Usage: $0 ip port"
  5. exit 1
  6. fi
  7. IP=$1
  8. PORT=$2
  9. echo "IP: $IP"
  10. echo "PORT: $PORT"
  11. aarch64-linux-gnu-strip ./build/app/app.out
  12. ssh -p $PORT root@$IP "systemctl stop zapp"
  13. ssh -p $PORT root@$IP "rm -rf /app/html"
  14. ssh -p $PORT root@$IP "rm -rf /app/app.out"
  15. scp -P $PORT build/app/app.out root@$IP:/app/
  16. scp -P $PORT -r html/ root@$IP:/app/html
  17. ssh -p $PORT root@$IP "systemctl start zapp"