Skip to content

Instantly share code, notes, and snippets.

@ahmadkakarr
Last active October 31, 2021 17:17
Show Gist options
  • Save ahmadkakarr/984bf73d18da4164fcd89ff29e925551 to your computer and use it in GitHub Desktop.
Save ahmadkakarr/984bf73d18da4164fcd89ff29e925551 to your computer and use it in GitHub Desktop.
import subprocess
subprocess.run('sudo systemctl status nginx', shell=True, check=True)
subprocess.run("sudo ufw allow 'Nginx Full'", shell=True, check=True)
subprocess.run('sudo ufw allow OpenSSH', shell=True, check=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment