jobs - avoid reload when not necessary
This commit is contained in:
@@ -36,8 +36,8 @@ echo "[*] Generate configuration files"
|
||||
do_and_check_cmd "/opt/bunkerized-nginx/gen/main.py --settings /opt/bunkerized-nginx/settings.json --templates /opt/bunkerized-nginx/confs --output /etc/nginx --variables /opt/bunkerized-nginx/variables.env"
|
||||
|
||||
# Run pre-jobs
|
||||
echo "[*] Run pre-jobs"
|
||||
do_and_check_cmd "/opt/bunkerized-nginx/entrypoint/pre-jobs.sh"
|
||||
echo "[*] Run jobs"
|
||||
do_and_check_cmd "/opt/bunkerized-nginx/entrypoint/jobs.sh"
|
||||
|
||||
# Reload nginx if it's running
|
||||
if [ -f "/tmp/nginx.pid" ] ; then
|
||||
@@ -49,6 +49,5 @@ else
|
||||
AS_ROOT="yes" do_and_check_cmd nginx -g 'daemon on; user nginx;'
|
||||
fi
|
||||
|
||||
# Run post-jobs
|
||||
echo "[*] Run post-jobs"
|
||||
do_and_check_cmd /opt/bunkerized-nginx/entrypoint/post-jobs.sh
|
||||
# Done
|
||||
echo "[*] bunkerized-nginx successfully executed"
|
||||
|
||||
@@ -886,27 +886,27 @@ fi
|
||||
|
||||
# Download abusers list
|
||||
echo "[*] Download abusers list"
|
||||
do_and_check_cmd /opt/bunkerized-nginx/jobs/main.py --name abusers
|
||||
do_and_check_cmd su -s "/bin/bash" -c "/opt/bunkerized-nginx/jobs/main.py --name abusers" nginx
|
||||
|
||||
# Download TOR exit nodes list
|
||||
echo "[*] Download TOR exit nodes list"
|
||||
do_and_check_cmd /opt/bunkerized-nginx/jobs/main.py --name exit-nodes
|
||||
do_and_check_cmd su -s "/bin/bash" -c "/opt/bunkerized-nginx/jobs/main.py --name exit-nodes" nginx
|
||||
|
||||
# Download proxies list
|
||||
echo "[*] Download proxies list"
|
||||
do_and_check_cmd /opt/bunkerized-nginx/jobs/main.py --name proxies
|
||||
do_and_check_cmd su -s "/bin/bash" -c "/opt/bunkerized-nginx/jobs/main.py --name proxies" nginx
|
||||
|
||||
# Download referrers list
|
||||
echo "[*] Download referrers list"
|
||||
do_and_check_cmd /opt/bunkerized-nginx/jobs/main.py --name referrers
|
||||
do_and_check_cmd su -s "/bin/bash" -c "/opt/bunkerized-nginx/jobs/main.py --name referrers" nginx
|
||||
|
||||
# Download user agents list
|
||||
echo "[*] Download user agents list"
|
||||
do_and_check_cmd /opt/bunkerized-nginx/jobs/main.py --name user-agents
|
||||
do_and_check_cmd su -s "/bin/bash" -c "/opt/bunkerized-nginx/jobs/main.py --name user-agents" nginx
|
||||
|
||||
# Download geoip database
|
||||
echo "[*] Download geoip DB"
|
||||
do_and_check_cmd /opt/bunkerized-nginx/jobs/main.py --name geoip
|
||||
do_and_check_cmd su -s "/bin/bash" -c "/opt/bunkerized-nginx/jobs/main.py --name geoip" nginx
|
||||
|
||||
# We're done
|
||||
cd "$old_dir"
|
||||
|
||||
Reference in New Issue
Block a user