From dc1cb0fab1aa4df1b76c6627ce1fbf5ffb06c934 Mon Sep 17 00:00:00 2001 From: Yi-Ting Shih Date: Mon, 19 Jan 2026 15:42:20 +0800 Subject: [PATCH] Chore: fix shellcheck --- vpn.bash | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vpn.bash b/vpn.bash index 29e6ca2..ce5259e 100755 --- a/vpn.bash +++ b/vpn.bash @@ -12,14 +12,14 @@ resolved_conf_d=( function stopvpn() { mapfile -t vpn_pid <<< "$(pgrep openfortivpn) $(pgrep openvpn) $(pgrep openconnect)" - for pid in ${vpn_pid[@]}; do + for pid in "${vpn_pid[@]}"; do if [[ -n "$pid" ]]; then echo "Kill process $pid." sudo kill "$pid" fi done - for conf in ${resolved_conf_d[@]}; do + for conf in "${resolved_conf_d[@]}"; do if [[ -e "/etc/systemd/resolved.conf.d/$conf" ]]; then sudo rm "/etc/systemd/resolved.conf.d/$conf" fi @@ -118,4 +118,4 @@ function main() { esac } -main $@ +main "$@"