Modify apply method of 14.1

This commit is contained in:
Samson-W 2020-11-02 21:56:30 +08:00
parent 6bf8a58bef
commit 34de8084d7
1 changed files with 6 additions and 1 deletions

View File

@ -70,7 +70,12 @@ apply () {
ok "$SYSCTL_PARAM correctly set to $SYSCTL_EXP_RESULT"
fi
else
warn "/proc/sys/net/netfilter/nf_conntrack_helper is not exist, just set $SYSCTL_PARAM = $SYSCTL_EXP_RESULT to /etc/sysctl.conf"
if [ $(grep "^$SYSCTL_PARAM = $SYSCTL_EXP_RESULT" /etc/sysctl.conf | wc -l) -eq 0 ]; then
echo "$SYSCTL_PARAM = $SYSCTL_EXP_RESULT" >> /etc/sysctl.conf
else
:
fi
fi
}