mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-13 22:02:34 +00:00
feat: Adds runs/after/localsend to set firewall ports.
This commit is contained in:
17
runs/after/localsend
Executable file
17
runs/after/localsend
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
install() {
|
||||||
|
sudo firewall-cmd --zone=public --permanent --add-port=53317/tcp
|
||||||
|
sudo firewall-cmd --zone=public --permanent --add-port=53317/udp
|
||||||
|
sudo firewall-cmd --reload
|
||||||
|
}
|
||||||
|
|
||||||
|
uninstall() {
|
||||||
|
sudo firewall-cmd --zone=public --permanent --remove-port=53317/tcp
|
||||||
|
sudo firewall-cmd --zone=public --permanent --remove-port=53317/udp
|
||||||
|
sudo firewall-cmd --reload
|
||||||
|
}
|
||||||
|
|
||||||
|
arg=${1:-""}
|
||||||
|
[[ $arg == "install" ]] && install
|
||||||
|
[[ $arg == "uninstall" ]] && uninstall
|
||||||
Reference in New Issue
Block a user