diff --git a/remote.sh b/remote.sh new file mode 100644 index 0000000..6173903 --- /dev/null +++ b/remote.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# SSH connection details +SSH_USER="username" +SSH_PASSWORD="password" +SMARTTV_IP="remote_ip" +SMARTTV_SCRIPT="python3 smarttv.py" + +# Function to execute Python script remotely +execute_remote() { + local command="$1" + sshpass -p "$SSH_PASSWORD" ssh "$SSH_USER@$SMARTTV_IP" "$SMARTTV_SCRIPT $command" +} + +# Check if a command is provided +if [ $# -eq 0 ]; then + echo "Usage: $0 " + exit 1 +fi + +# Call the function with the provided command +execute_remote "$1"