mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-22 21:21:42 +00:00
fix compatible for sh. head -n -1 is not supported on pfsense.
This commit is contained in:
parent
cada9dc0a0
commit
c5f2df5c93
6
acme.sh
6
acme.sh
@ -194,7 +194,7 @@ _getfile() {
|
|||||||
_err "Can not find start line: $startline"
|
_err "Can not find start line: $startline"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
i="$(_math $i + 1)"
|
||||||
_debug i $i
|
_debug i $i
|
||||||
|
|
||||||
j="$(grep -n -- "$endline" $filename | cut -d : -f 1)"
|
j="$(grep -n -- "$endline" $filename | cut -d : -f 1)"
|
||||||
@ -202,10 +202,10 @@ _getfile() {
|
|||||||
_err "Can not find end line: $endline"
|
_err "Can not find end line: $endline"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
j="$(_math $j - 1)"
|
||||||
_debug j $j
|
_debug j $j
|
||||||
|
|
||||||
sed -n $i,${j}p "$filename" | head -n -1 | tail -n +2
|
sed -n $i,${j}p "$filename"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user