mirror of
https://github.com/unraid/webgui.git
synced 2026-01-09 19:20:06 -06:00
backup go script with random extension
Revert "backup go script with random extension" This reverts commit f3498bd869e998040685399a2cb198e57809653f. change backup extension
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user