Remove old files.
Remove iptables_redirect.sh if exists to download new one.pull/18/head^2
parent
156cbc266b
commit
d0a0af17c8
|
|
@ -10,6 +10,7 @@ NO_COLOR='\033[0m'
|
|||
ST_PORT=80
|
||||
|
||||
LINK="https://raw.githubusercontent.com/schizza/SWS-12500-custom-component/main/iptables_redirect.sh"
|
||||
FILENAME="iptables_redirect.sh"
|
||||
|
||||
P_HA=true
|
||||
P_ST=true
|
||||
|
|
@ -55,7 +56,7 @@ function validate_num() {
|
|||
}
|
||||
|
||||
function validate_dest() {
|
||||
echo "Validating host '$1' ... "
|
||||
echo -n "Validating host '$1' ... "
|
||||
if ping -c 2 $1 >/dev/null 2>&1; then
|
||||
info "OK"
|
||||
true
|
||||
|
|
@ -106,6 +107,8 @@ for _PATH in "${HA_PATHS[@]}"; do
|
|||
fi
|
||||
done
|
||||
|
||||
rm -f "$FILENAME"
|
||||
|
||||
[ -z $HA_PATH ] && { error "Home Assistant not found!"; }
|
||||
info "found at $HA_PATH"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue