mirror of
https://github.com/pivpn/pivpn.git
synced 2025-05-14 03:44:11 +02:00
refactor: improve code style
Improve the code style of some pieces of code
This commit is contained in:
parent
9a7b7dfe72
commit
dda4d99f10
9 changed files with 54 additions and 128 deletions
|
@ -443,8 +443,7 @@ echo "tls Private Key found: ${TA}"
|
|||
|
||||
# Next append the client Public Cert
|
||||
echo "<cert>"
|
||||
sed \
|
||||
-n \
|
||||
sed -n \
|
||||
-e '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' \
|
||||
< "issued/${NAME}${CRT}"
|
||||
echo "</cert>"
|
||||
|
@ -517,8 +516,7 @@ for i in {2..254}; do
|
|||
# disabling SC2514, variable sourced externaly
|
||||
# shellcheck disable=SC2154
|
||||
if [[ -z "$(ls -A /etc/openvpn/ccd)" ]] \
|
||||
|| ! find /etc/openvpn/ccd \
|
||||
-type f \
|
||||
|| ! find /etc/openvpn/ccd -type f \
|
||||
-exec grep -q "${NET_REDUCED}.${i}" {} +; then
|
||||
COUNT="${i}"
|
||||
echo -n "ifconfig-push ${NET_REDUCED}.${i}" >> /etc/openvpn/ccd/"${NAME}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue