Skip to content
This repository was archived by the owner on Jan 7, 2024. It is now read-only.

Commit f0cd761

Browse files
committed
Account for people making typos
1 parent 54587c4 commit f0cd761

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

root/etc/cont-init.d/20-config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ if grep -q "xmx" /config/data/system.properties && grep -q "xms" /config/data/sy
2525

2626
if [[ -n $MEM_LIMIT ]]; then
2727
echo "*** Setting Java memory limit to $MEM_LIMIT ***"
28-
sed -i "s/unifi.xmx=[0-9]\{1,5\}/unifi.xmx=$MEM_LIMIT/" /config/data/system.properties
28+
sed -i "s/unifi.xmx=.*/unifi.xmx=$MEM_LIMIT/" /config/data/system.properties
2929
fi
3030

3131
if [[ -n $MEM_STARTUP ]]; then
3232
echo "*** Setting Java memory minimum to $MEM_STARTUP ***"
33-
sed -i "s/unifi.xms=[0-9]\{1,5\}/unifi.xms=$MEM_STARTUP/" /config/data/system.properties
33+
sed -i "s/unifi.xms=.*/unifi.xms=$MEM_STARTUP/" /config/data/system.properties
3434
fi
3535

3636
elif grep -q "xmx" /config/data/system.properties; then
3737

3838
if [[ -n $MEM_LIMIT ]]; then
3939
echo "*** Setting Java memory limit to $MEM_LIMIT ***"
40-
sed -i "s/unifi.xmx=[0-9]\{1,5\}/unifi.xmx=$MEM_LIMIT/" /config/data/system.properties
40+
sed -i "s/unifi.xmx=.*/unifi.xmx=$MEM_LIMIT/" /config/data/system.properties
4141
fi
4242

4343
if [[ -n $MEM_STARTUP ]]; then
@@ -49,7 +49,7 @@ elif grep -q "xms" /config/data/system.properties; then
4949

5050
if [[ -n $MEM_STARTUP ]]; then
5151
echo "*** Setting Java memory minimum to $MEM_STARTUP ***"
52-
sed -i "s/unifi.xms=[0-9]\{1,5\}/unifi.xms=$MEM_STARTUP/" /config/data/system.properties
52+
sed -i "s/unifi.xms=.*/unifi.xms=$MEM_STARTUP/" /config/data/system.properties
5353
fi
5454

5555
if [[ -n $MEM_LIMIT ]]; then

0 commit comments

Comments
 (0)