mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 18:49:17 -07:00
renamed api function per naming convention
This commit is contained in:
parent
f7d1d2c84e
commit
94ddaa3622
84 changed files with 40 additions and 40 deletions
52
bin/v_add_user_backup
Executable file
52
bin/v_add_user_backup
Executable file
|
@ -0,0 +1,52 @@
|
|||
#!/bin/bash
|
||||
# info: schedule user backup
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Variable&Function #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Argument defenition
|
||||
user=$1
|
||||
|
||||
# Importing variables
|
||||
source $VESTA/conf/vars.conf
|
||||
source $V_CONF/vesta.conf
|
||||
source $V_FUNC/shared.func
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Verifications #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Checking arg number
|
||||
check_args '1' "$#" 'user'
|
||||
|
||||
# Checking argument format
|
||||
format_validation 'user'
|
||||
|
||||
# Checking backup system is enabled
|
||||
is_system_enabled 'backup'
|
||||
|
||||
# Checking user
|
||||
is_user_valid
|
||||
|
||||
# Checking user backups
|
||||
is_backup_enabled
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Action #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Adding backup to pipe
|
||||
echo "$user" >> $V_QUEUE/backup.pipe
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Vesta #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Logging
|
||||
log_event 'system' "$V_EVENT"
|
||||
|
||||
exit
|
Loading…
Add table
Add a link
Reference in a new issue