summaryrefslogtreecommitdiffstats
path: root/adei/configs/adei_manager.cron.sh
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-02-23 02:11:06 +0100
committerSuren A. Chilingaryan <csa@suren.me>2018-02-23 02:11:06 +0100
commitb81418759a81dd1e3064a6a5975271277d5c51c8 (patch)
tree15126dcb07609df7b75141842a4f2b3cb3dbe350 /adei/configs/adei_manager.cron.sh
parent56bca63e5daf375f13500c0a79f2ddf2b678769d (diff)
downloadadei-b81418759a81dd1e3064a6a5975271277d5c51c8.tar.gz
adei-b81418759a81dd1e3064a6a5975271277d5c51c8.tar.bz2
adei-b81418759a81dd1e3064a6a5975271277d5c51c8.tar.xz
adei-b81418759a81dd1e3064a6a5975271277d5c51c8.zip
Save session variables in writable /tmp folder
Diffstat (limited to 'adei/configs/adei_manager.cron.sh')
-rw-r--r--adei/configs/adei_manager.cron.sh74
1 files changed, 0 insertions, 74 deletions
diff --git a/adei/configs/adei_manager.cron.sh b/adei/configs/adei_manager.cron.sh
deleted file mode 100644
index 0ba77b5..0000000
--- a/adei/configs/adei_manager.cron.sh
+++ /dev/null
@@ -1,74 +0,0 @@
-#! /bin/bash
-
-
-function process_setup {
- setup="$1"
- parallel="$2"
-
- local args="-parallel $parallel"
- if [ -n "$setup" ]; then
- args="$args -setup $setup"
- else
- setup=$(php -r 'require "adei.php"; echo $ADEI_SETUP;')
- fi
-
- if [ ! -d "setups/$setup" ]; then
- echo "$setup is not existing"
- return
- fi
-
- if [ -f setups/$setup/adei_manager.cron.sh ]; then
- setups/$setup/adei_manager.cron.sh
- return
- fi
-
- if [ -f setups/$setup/.cache_archives ]; then
- /usr/bin/php system/cache.php -archives $args
- fi
-
- if [ -f setups/$setup/.backup ]; then
- /usr/bin/php system/backup.php $args
- fi
-}
-
-[ -f /adei/env ] && . /adei/env
-
-script=$( cd $(dirname "$0") && pwd )/$( basename "$0" )
-if [ -f /adei/sys/adei_manager.cron.sh -a "$script" != /adei/sys/adei_manager.cron.sh ]; then
- /adei/sys/adei_manager.cron.sh
- exit
-fi
-
-(
- cd /srv/www/htdocs/adei
-
- if [ -n "$ADEI_SETUP" -o -n "$ADEI_ENABLED_SETUPS" ]; then
- if [ "$ADEI_SETUP" = "all" ]; then
- list=$(echo "$ADEI_ENABLED_SETUPS" | xargs -n 1 | sort -u)
- else
- list=$(echo "$ADEI_SETUP $ADEI_ENABLED_SETUPS" | xargs -n 1 | sort -u)
- fi
- else
- for name in setups/*; do
- if [ -f $name/.cache ]; then
- list="$list $(basename $name)"
- fi
- done
- fi
-
- if [ -n "$list" ]; then
- for setup in $list; do
- process_setup "$setup" "$ADEI_PARALLEL" &
- pids="$pids $!"
- done
- else
- process_setup "" "$ADEI_PARALLEL" &
- pids="$!"
- fi
-
- /usr/bin/php system/downloads_clean.php
-
- for pid in $pids; do
- wait $pid
- done
-)