mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 05:44:07 -07:00
Merge changes from upstream
I'm a little angry
This commit is contained in:
parent
dcf849263d
commit
2b16d9bd83
254 changed files with 24485 additions and 24094 deletions
|
@ -1,61 +1,61 @@
|
|||
#!/bin/bash
|
||||
# info: update system queue
|
||||
# options: pipe
|
||||
#
|
||||
# This function is responsible queue processing. Restarts of services,
|
||||
# scheduled backups, web log parsing and other heavy resource consuming
|
||||
# operations are handled by this script. It helps to optimize system behaviour.
|
||||
# In a nutshell Apache will be restarted only once even if 10 domains are
|
||||
# added or deleted.
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Variable&Function #
|
||||
#----------------------------------------------------------#
|
||||
# Argument defenition
|
||||
queue=$1
|
||||
|
||||
# Importing system enviroment as we run this script
|
||||
# mostly by cron wich not read it by itself
|
||||
source /etc/profile
|
||||
|
||||
# Includes
|
||||
source $VESTA/conf/vesta.conf
|
||||
source $VESTA/func/main.sh
|
||||
|
||||
# Export PATH for cron
|
||||
PATH=$PATH:$BIN
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Verifications #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
check_args '1' "$#" 'queue'
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Action #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Defining pipe functions
|
||||
case $queue in
|
||||
restart) bash $VESTA/data/queue/restart.pipe;
|
||||
rm $VESTA/data/queue/restart.pipe;
|
||||
touch $VESTA/data/queue/restart.pipe;;
|
||||
webstats) bash $VESTA/data/queue/webstats.pipe > /dev/null 2>&1 ;;
|
||||
backup) bash $VESTA/data/queue/backup.pipe;;
|
||||
disk) bash $VESTA/data/queue/disk.pipe;;
|
||||
traffic) bash $VESTA/data/queue/traffic.pipe;;
|
||||
*) check_args '1' '0' 'queue'
|
||||
esac
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Vesta #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# No Logging
|
||||
#log_event "$OK" "$EVENT"
|
||||
|
||||
exit
|
||||
#!/bin/bash
|
||||
# info: update system queue
|
||||
# options: PIPE
|
||||
#
|
||||
# This function is responsible queue processing. Restarts of services,
|
||||
# scheduled backups, web log parsing and other heavy resource consuming
|
||||
# operations are handled by this script. It helps to optimize system behaviour.
|
||||
# In a nutshell Apache will be restarted only once even if 10 domains are
|
||||
# added or deleted.
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Variable&Function #
|
||||
#----------------------------------------------------------#
|
||||
# Argument defenition
|
||||
queue=$1
|
||||
|
||||
# Importing system enviroment as we run this script
|
||||
# mostly by cron wich not read it by itself
|
||||
source /etc/profile
|
||||
|
||||
# Includes
|
||||
source $VESTA/conf/vesta.conf
|
||||
source $VESTA/func/main.sh
|
||||
|
||||
# Export PATH for cron
|
||||
PATH=$PATH:$BIN
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Verifications #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
check_args '1' "$#" 'QUEUE'
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Action #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Defining pipe functions
|
||||
case $queue in
|
||||
restart) bash $VESTA/data/queue/restart.pipe;
|
||||
rm $VESTA/data/queue/restart.pipe;
|
||||
touch $VESTA/data/queue/restart.pipe;;
|
||||
webstats) bash $VESTA/data/queue/webstats.pipe > /dev/null 2>&1 ;;
|
||||
backup) bash $VESTA/data/queue/backup.pipe;;
|
||||
disk) bash $VESTA/data/queue/disk.pipe;;
|
||||
traffic) bash $VESTA/data/queue/traffic.pipe;;
|
||||
*) check_args '1' '0' 'QUEUE'
|
||||
esac
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Vesta #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# No Logging
|
||||
#log_event "$OK" "$EVENT"
|
||||
|
||||
exit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue