File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ if ((Test-Path -Path $($pathBackup + $fileSLSBackup) -PathType Leaf) -ne $false)
49
49
slsIP=192.168.1.247
50
50
tokenSLS=" e9d38bedb6412e.....ed9575"
51
51
backupPath=" /var/backups/$slsIP /$( date +%Y%m%d_%H%M) "
52
- fileSLSBackup=backup_ $backupPath .sls
52
+ fileSLSBackup=native.backup
53
53
mkdir -p $backupPath
54
54
# backup all Files
55
55
url=" $slsIP /api/storage?token=$tokenSLS &path=/"
@@ -60,7 +60,7 @@ if [[ $(echo $result | jq ".success") = "true" ]]; then
60
60
if [[ $( echo $i | jq -c -r " .is_dir" ) = " false" ]]; then
61
61
f=$( echo $i | jq -c -r " .name" )
62
62
echo $f
63
- curl -o ./ $backupPath /$f $url$f 2> /dev/null
63
+ curl -o $backupPath /$f $url$f 2> /dev/null
64
64
# break
65
65
fi
66
66
done
70
70
# native backup
71
71
url=$slsIP /api/backup
72
72
get=" token=$tokenSLS &action=create&config=1&zigbee=1"
73
- curl -d $get -o ./ $backupPath /$fileSLSBackup $url 2> /dev/null
74
- if [ -f " ./ $backupPath /$fileSLSBackup " ]; then
73
+ curl -d $get -o $backupPath /$fileSLSBackup $url 2> /dev/null
74
+ if [ -f " $backupPath /$fileSLSBackup " ]; then
75
75
echo $fileSLSBackup
76
76
else
77
77
echo Error request for native backup: File Not Found
You can’t perform that action at this time.
0 commit comments