Skip to content

Commit b8086d0

Browse files
authored
Merge pull request #417 from yungwine/backup
fix restore_backup
2 parents f483fc3 + ff0c64e commit b8086d0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mytonctrl/scripts/restore_backup.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ do
1616
esac
1717
done
1818

19+
if [ ! -f "$name" ]; then
20+
echo "Backup file not found, aborting."
21+
exit 1
22+
fi
1923

2024
COLOR='\033[92m'
2125
ENDC='\033[0m'
@@ -43,6 +47,8 @@ rm -rf /var/ton-work/db/keyring
4347

4448
chown -R $user:$user ${tmp_dir}/mytoncore
4549
chown -R $user:$user ${tmp_dir}/keys
50+
chown validator:validator ${tmp_dir}/keys
51+
chown -R validator:validator ${tmp_dir}/db
4652

4753
cp -rfp ${tmp_dir}/db /var/ton-work
4854
cp -rfp ${tmp_dir}/keys /var/ton-work

0 commit comments

Comments
 (0)