mirror of
https://github.com/dnscrypt/dnscrypt-server-docker
synced 2024-11-22 19:42:03 +01:00
Use replace non-standard egrep/fgrep with grep -E/-F
This commit is contained in:
parent
3de5db51e9
commit
fc47a319d4
@ -14,5 +14,5 @@ rotation_needed() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[ "$(rotation_needed)" = true ] || exit 0
|
[ "$(rotation_needed)" = true ] || exit 0
|
||||||
sv status dnscrypt-wrapper | egrep -q '^run:' || exit 0
|
sv status dnscrypt-wrapper | grep -E -q '^run:' || exit 0
|
||||||
sv restart dnscrypt-wrapper
|
sv restart dnscrypt-wrapper
|
||||||
|
@ -4,7 +4,7 @@ KEYS_DIR="/opt/dnscrypt-wrapper/etc/keys"
|
|||||||
ZONES_DIR="/opt/unbound/etc/unbound/zones"
|
ZONES_DIR="/opt/unbound/etc/unbound/zones"
|
||||||
|
|
||||||
reserved=12582912
|
reserved=12582912
|
||||||
availableMemory=$((1024 * $( (fgrep MemAvailable /proc/meminfo || fgrep MemTotal /proc/meminfo) | sed 's/[^0-9]//g' ) ))
|
availableMemory=$((1024 * $( (grep -F MemAvailable /proc/meminfo || grep -F MemTotal /proc/meminfo) | sed 's/[^0-9]//g' ) ))
|
||||||
if [ $availableMemory -le $((reserved * 2)) ]; then
|
if [ $availableMemory -le $((reserved * 2)) ]; then
|
||||||
echo "Not enough memory" >&2
|
echo "Not enough memory" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user