1. Import
This commit is contained in:
91
html/sysadmin/cron/do_rsync
Normal file
91
html/sysadmin/cron/do_rsync
Normal file
@@ -0,0 +1,91 @@
|
||||
#!/bin/sh
|
||||
log_file="/root/votian_admin/do_rsync_`date +%Y``date +%m`.log"
|
||||
|
||||
# rsync LN (started on 26.02.2021)
|
||||
rsync -e ssh -avz root@172.16.0.147:/srv/htdocs/services/LN_LIVE/*.php /home/mps2/stadtbote/service/LN_374893028394/ >> ${log_file} 2>&1
|
||||
rsync -e ssh -avz /home/mps2/stadtbote/service/LN_374893028394/*.txt root@172.16.0.147:/srv/htdocs/services/LN_LIVE/ >> ${log_file} 2>&1
|
||||
|
||||
## rsync photos (stopped on 05.04.2016)
|
||||
#rsync -e ssh -avz --exclude=htg_pics --delete --bwlimit=5000 root@172.16.0.104:/home/retrans/ftp/mbl_foto/ /srv/www/htm/documents/photos/ >> ${log_file} 2>&1
|
||||
#echo [`date +%F" "%X" "%Z`] rsync finished >> ${log_file}
|
||||
|
||||
## restart check_jb_permanent.1000.php if not running
|
||||
# not needed any longer: disabled on 2017-12-31
|
||||
#check_jb_permanent_found="false"
|
||||
#for php_pid in `pidof php`
|
||||
#do
|
||||
# check_jb_permanent_pid=`ps $php_pid | grep check_jb_permanent.1000.php`
|
||||
# if [ "$check_jb_permanent_pid" != "" ]; then
|
||||
# check_jb_permanent_found="true"
|
||||
# fi
|
||||
#done
|
||||
#if [ "$check_jb_permanent_found" != "true" ]; then
|
||||
# cd /srv/www/htm/jobs
|
||||
# php /srv/www/htm/jobs/check_jb_permanent.1000.php >> ../log/check_jb_permanent.1000.err 2>&1 &
|
||||
# echo [`date +%F" "%X" "%Z`] check_jb_permanent.1000.php restarted >> ${log_file}
|
||||
#fi
|
||||
|
||||
# restart check_jb_permanent.auto.php if not running
|
||||
check_jb_permanent_found="false"
|
||||
for php_pid in `pidof php`
|
||||
do
|
||||
check_jb_permanent_pid=`ps $php_pid | grep check_jb_permanent.auto.php`
|
||||
if [ "$check_jb_permanent_pid" != "" ]; then
|
||||
check_jb_permanent_found="true"
|
||||
fi
|
||||
done
|
||||
#if [ "$check_jb_permanent_found" != "true" ]; then
|
||||
# cd /home/mps2/stadtbote_auto/jobs
|
||||
# php /home/mps2/stadtbote_auto/jobs/check_jb_permanent.auto.php >> ../log/check_jb_permanent.auto.err 2>&1 &
|
||||
# echo [`date +%F" "%X" "%Z`] check_jb_permanent.auto.php restarted >> ${log_file}
|
||||
#fi
|
||||
if [ "$check_jb_permanent_found" != "true" ]; then
|
||||
cd /home/mps2/stadtbote/jobs
|
||||
php /home/mps2/stadtbote/jobs/check_jb_permanent.auto.php >> ../log/check_jb_permanent.auto.err 2>&1 &
|
||||
echo [`date +%F" "%X" "%Z`] check_jb_permanent.auto.php restarted >> ${log_file}
|
||||
fi
|
||||
|
||||
# restart check_jb_permanent.auto.service.php if not running
|
||||
check_jb_permanent_found="false"
|
||||
for php_pid in `pidof php`
|
||||
do
|
||||
check_jb_permanent_pid=`ps $php_pid | grep check_jb_permanent.auto.service.php`
|
||||
if [ "$check_jb_permanent_pid" != "" ]; then
|
||||
check_jb_permanent_found="true"
|
||||
fi
|
||||
done
|
||||
if [ "$check_jb_permanent_found" != "true" ]; then
|
||||
cd /home/mps2/stadtbote/jobs
|
||||
php /home/mps2/stadtbote/jobs/check_jb_permanent.auto.service.php >> ../log/check_jb_permanent.auto.service.err 2>&1 &
|
||||
echo [`date +%F" "%X" "%Z`] check_jb_permanent.auto.service.php restarted >> ${log_file}
|
||||
fi
|
||||
|
||||
## restart check_jb_permanent.auto_test.php if not running
|
||||
#check_jb_permanent_found="false"
|
||||
#for php_pid in `pidof php`
|
||||
#do
|
||||
# check_jb_permanent_pid=`ps $php_pid | grep check_jb_permanent.auto_test.php`
|
||||
# if [ "$check_jb_permanent_pid" != "" ]; then
|
||||
# check_jb_permanent_found="true"
|
||||
# fi
|
||||
#done
|
||||
#if [ "$check_jb_permanent_found" != "true" ]; then
|
||||
# cd /home/mps2/test_sb/jobs
|
||||
# php /home/mps2/test_sb/jobs/check_jb_permanent.auto_test.php >> ../log/check_jb_permanent.auto_test.err 2>&1 &
|
||||
# echo [`date +%F" "%X" "%Z`] check_jb_permanent.auto_test.php restarted >> ${log_file}
|
||||
#fi
|
||||
|
||||
## restart automailer_cfm_main.php if not running
|
||||
#check_jb_permanent_found="false"
|
||||
#for php_pid in `pidof php`
|
||||
#do
|
||||
# check_jb_permanent_pid=`ps $php_pid | grep automailer_cfm_main.php`
|
||||
# if [ "$check_jb_permanent_pid" != "" ]; then
|
||||
# check_jb_permanent_found="true"
|
||||
# fi
|
||||
#done
|
||||
#if [ "$check_jb_permanent_found" != "true" ]; then
|
||||
# cd /home/mps2/test_cfm/include
|
||||
# php /home/mps2/test_cfm/include/automailer_cfm_main.php >> ../log/automailer_cfm_main.err 2>&1 &
|
||||
# echo [`date +%F" "%X" "%Z`] automailer_cfm_main.php restarted >> ${log_file}
|
||||
#fi
|
||||
Reference in New Issue
Block a user