Skip to content

Instantly share code, notes, and snippets.

@NotYusta
Last active March 2, 2024 09:26
Show Gist options
  • Save NotYusta/0d669bd57bfc67a56c8f1f18941a2b9a to your computer and use it in GitHub Desktop.
Save NotYusta/0d669bd57bfc67a56c8f1f18941a2b9a to your computer and use it in GitHub Desktop.
RC Local
#!/bin/sh
if ! grep -q "bash /root/firewall.sh" "/etc/rc.local"; then
echo 'bash /root/firewall.sh' | sudo tee -a /etc/rc.local
fi
chmod +x /etc/rc.d/rc.local
systemctl enable rc-local --now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment