Add wireguard interface reloading function to zsh

This commit is contained in:
Tanguy Herbron 2022-01-17 11:02:24 +01:00
parent 7bac286d62
commit 6f82cb1542

5
.zshrc
View File

@ -100,6 +100,11 @@ alias gitcommiiiiiiiiiiiiiit='cz'
alias clip='xclip -selection primary' alias clip='xclip -selection primary'
# alias wg-reload="f() {sudo bash -c 'cd /etc/wireguard && wg syncconf $1 <(wg-quick strip $1)'};f"
function wg-reload() {
sudo bash -c 'cd /etc/wireguard && wg syncconf $0 <(wg-quick strip $0)' $1
}
# Finally, start a tmux session # Finally, start a tmux session
[ -x "$(command -v tmux)" ] \ [ -x "$(command -v tmux)" ] \
&& [ -z "${TMUX}" ] \ && [ -z "${TMUX}" ] \