From b7f69da252ff9ae450dd2cf85c020b8b4f93bf2d Mon Sep 17 00:00:00 2001 From: ljm42 Date: Fri, 12 Apr 2024 13:06:59 -0700 Subject: [PATCH] change backup extension --- etc/rc.d/rc.local | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/rc.d/rc.local b/etc/rc.d/rc.local index 7ea2a4632..58a712981 100755 --- a/etc/rc.d/rc.local +++ b/etc/rc.d/rc.local @@ -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