mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 02:28:03 -07:00
full backup and restore
This commit is contained in:
parent
60f812d41c
commit
01b51dd21d
4 changed files with 168 additions and 139 deletions
|
@ -148,6 +148,15 @@ is_type_valid() {
|
|||
fi
|
||||
}
|
||||
|
||||
# Check if backup is available for user
|
||||
is_backup_available() {
|
||||
if [ "$user" != "$(echo $backup | cut -f 1 -d '.')" ]; then
|
||||
echo "Error: User $user don't have permission to use $backup"
|
||||
log_event "$E_FORBIDEN" "$EVENT"
|
||||
exit $E_FORBIDEN
|
||||
fi
|
||||
}
|
||||
|
||||
# Check user backup settings
|
||||
is_backup_enabled() {
|
||||
BACKUPS=$(grep "^BACKUPS=" $USER_DATA/user.conf | cut -f2 -d \')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue