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