···1+#!/bin/bash
2+3+# Variables
4+BINARY_NAME="appview"
5+BINARY_PATH=".bin/app"
6+SERVER="95.111.206.63"
7+USER="appview"
8+9+# SCP the binary to root's home directory
10+scp "$BINARY_PATH" root@$SERVER:/root/"$BINARY_NAME"
11+12+# SSH into the server and perform the necessary operations
13+ssh root@$SERVER <<EOF
14+ set -e # Exit on error
15+16+ # Move binary to /usr/local/bin and set executable permissions
17+ mv /root/$BINARY_NAME /usr/local/bin/$BINARY_NAME
18+ chmod +x /usr/local/bin/$BINARY_NAME
19+20+ su appview
21+ cd ~
22+ ./reset.sh
23+EOF
24+25+echo "Deployment complete."
26+