change backup extension

This commit is contained in:
ljm42
2024-04-12 13:06:59 -07:00
parent 80b200950f
commit b7f69da252

View File

@@ -193,13 +193,13 @@ fi
# add new line with call to emhttp (preserve any params to emhttp and CRLF line endings)
GOTEST1='^[^#]*/usr/local/sbin/emhttp(.*)&(.*)$'
if grep -q -E "$GOTEST1" $CONFIG/go; then
cp $CONFIG/go $CONFIG/go-
cp $CONFIG/go $CONFIG/go~
sed -i -E "s@$GOTEST1@/usr/local/sbin/emhttp\1\2@g" $CONFIG/go
fi
# delete lines added by ProxyEditor
GOTEST2='# Added by ProxyEditor'
if grep -q "$GOTEST2" $CONFIG/go; then
[[ ! -f $CONFIG/go- ]] && cp $CONFIG/go $CONFIG/go-
[[ ! -f $CONFIG/go~ ]] && cp $CONFIG/go $CONFIG/go~
sed -i "/$GOTEST2/d" $CONFIG/go
fi