Skip to content

Instantly share code, notes, and snippets.

@joshespi
Created May 24, 2023 19:32
Show Gist options
  • Save joshespi/a186c91b6adfd1258f63cd4d52334ea3 to your computer and use it in GitHub Desktop.
Save joshespi/a186c91b6adfd1258f63cd4d52334ea3 to your computer and use it in GitHub Desktop.
simple script that will invoke our update script on remote servers. then ping for you to monitor the reboot
#!/bin/sh
#
# Define the IP address variable
IP_ADDRESS="158.91.1.124"
# Runs apt upgrade, dist-upgrade, autoclean, autoremove, and reboots the VM
ssh webadmin@$IP_ADDRESS -t 'sudo /home/webadmin/update.sh'
# Ping the IP address
ping $IP_ADDRESS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment