mirror of
https://github.com/routerich/RouterichAX3000_configs.git
synced 2026-01-31 06:30:35 +03:00
Add if exists folder backup
This commit is contained in:
@@ -7,14 +7,16 @@ config_files="dhcp
|
|||||||
youtubeUnblock
|
youtubeUnblock
|
||||||
https-dns-proxy"
|
https-dns-proxy"
|
||||||
|
|
||||||
echo "Restore configs..."
|
if [ -d "$DIR_BACKUP" ]
|
||||||
|
then
|
||||||
|
echo "Restore configs..."
|
||||||
|
for file in $config_files
|
||||||
|
do
|
||||||
|
cp -f "$DIR_BACKUP/$file" "$DIR/$file"
|
||||||
|
done
|
||||||
|
|
||||||
for file in $config_files
|
rm -rf "$DIR_BACKUP"
|
||||||
do
|
fi
|
||||||
cp -f "$DIR_BACKUP/$file" "$DIR/$file"
|
|
||||||
done
|
|
||||||
|
|
||||||
rm -rf "$DIR_BACKUP"
|
|
||||||
|
|
||||||
echo "Restart service..."
|
echo "Restart service..."
|
||||||
|
|
||||||
@@ -29,4 +31,4 @@ grep -v "0 4 \* \* \* wget -O - $URL/configure_zaprets.sh | sh" /etc/crontabs/ro
|
|||||||
cp -f "/etc/crontabs/temp" "/etc/crontabs/root"
|
cp -f "/etc/crontabs/temp" "/etc/crontabs/root"
|
||||||
rm -f "/etc/crontabs/temp"
|
rm -f "/etc/crontabs/temp"
|
||||||
|
|
||||||
echo "Off configure complete..."
|
printf "\033[32;1mOff configured completed...\033[0m"
|
||||||
|
|||||||
Reference in New Issue
Block a user