1. Import
This commit is contained in:
39
html/sysadmin/votian_admin/crontab_20211207.sav
Normal file
39
html/sysadmin/votian_admin/crontab_20211207.sav
Normal file
@@ -0,0 +1,39 @@
|
||||
# Edit this file to introduce tasks to be run by cron.
|
||||
#
|
||||
# Each task to run has to be defined through a single line
|
||||
# indicating with different fields when the task will be run
|
||||
# and what command to run for the task
|
||||
#
|
||||
# To define the time you can provide concrete values for
|
||||
# minute (m), hour (h), day of month (dom), month (mon),
|
||||
# and day of week (dow) or use '*' in these fields (for 'any').#
|
||||
# Notice that tasks will be started based on the cron's system
|
||||
# daemon's notion of time and timezones.
|
||||
#
|
||||
# Output of the crontab jobs (including errors) is sent through
|
||||
# email to the user the crontab file belongs to (unless redirected).
|
||||
#
|
||||
# For example, you can run a backup of all your user accounts
|
||||
# at 5 a.m every week with:
|
||||
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
|
||||
#
|
||||
# For more information see the manual pages of crontab(5) and cron(8)
|
||||
#
|
||||
# m h dom mon dow command
|
||||
@reboot ping -i 15 10.243.26.59
|
||||
01 00 * * * php /root/votian_admin/do_bzip2.php
|
||||
#00 02 * * * php /root/votian_admin/do_rsync.php
|
||||
00 03 * * 6 /root/certbot/certbot-auto renew --text >> /root/certbot/certbot-cron.log && service apache2 reload
|
||||
15 03 * * * /sbin/handle_log
|
||||
*/5 * * * * /root/votian_admin/do_rsync
|
||||
*/5 * * * * php /root/votian_admin/mysql_status.php
|
||||
*/15 * * * * /root/votian_admin/do_cron_monitor_replication
|
||||
10 05 * * * /root/votian_admin/do_cron_soap_1
|
||||
20 05 * * * /root/votian_admin/do_cron_soap_0
|
||||
*/30 * * * * /root/votian_admin/do_auto_logout_by_autorevokes
|
||||
15 02 * * * /root/votian_admin/do_cron_vht_dispo_days_HHA
|
||||
00 04 * * 1-5 /root/votian_admin/do_cron_STB_MAILS
|
||||
45 20 * * * /root/votian_admin/do_cron_export_SB
|
||||
30 04 * * * /root/votian_admin/do_cron_export_HHA
|
||||
40 09 * * * /root/votian_admin/do_cron_special_HHA
|
||||
|
||||
45
html/sysadmin/votian_admin/do_auto_export_PDF
Normal file
45
html/sysadmin/votian_admin/do_auto_export_PDF
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
cd /srv/www/sb/tools/
|
||||
|
||||
php auto_export_PDF.php acapella7890 841944
|
||||
|
||||
#php auto_export_PDF.php acapella7890 831535
|
||||
#php auto_export_PDF.php acapella7890 304380
|
||||
#php auto_export_PDF.php acapella7890 304440
|
||||
#php auto_export_PDF.php acapella7890 304687
|
||||
#php auto_export_PDF.php acapella7890 304768
|
||||
#php auto_export_PDF.php acapella7890 304962
|
||||
#php auto_export_PDF.php acapella7890 305026
|
||||
#php auto_export_PDF.php acapella7890 305578
|
||||
#php auto_export_PDF.php acapella7890 305852
|
||||
#php auto_export_PDF.php acapella7890 306070
|
||||
#php auto_export_PDF.php acapella7890 305598
|
||||
#php auto_export_PDF.php acapella7890 306156
|
||||
#php auto_export_PDF.php acapella7890 306155
|
||||
#php auto_export_PDF.php acapella7890 306223
|
||||
#php auto_export_PDF.php acapella7890 306217
|
||||
#php auto_export_PDF.php acapella7890 306261
|
||||
#php auto_export_PDF.php acapella7890 305718
|
||||
#php auto_export_PDF.php acapella7890 306580
|
||||
#php auto_export_PDF.php acapella7890 306779
|
||||
#php auto_export_PDF.php acapella7890 307081
|
||||
#php auto_export_PDF.php acapella7890 307244
|
||||
#php auto_export_PDF.php acapella7890 304414
|
||||
#php auto_export_PDF.php acapella7890 307364
|
||||
#php auto_export_PDF.php acapella7890 308146
|
||||
#php auto_export_PDF.php acapella7890 305646
|
||||
#php auto_export_PDF.php acapella7890 308590
|
||||
#php auto_export_PDF.php acapella7890 317032
|
||||
#php auto_export_PDF.php acapella7890 317074
|
||||
#php auto_export_PDF.php acapella7890 306399
|
||||
#php auto_export_PDF.php acapella7890 316372
|
||||
#php auto_export_PDF.php acapella7890 316373
|
||||
#php auto_export_PDF.php acapella7890 316374
|
||||
#php auto_export_PDF.php acapella7890 316375
|
||||
#php auto_export_PDF.php acapella7890 316615
|
||||
#php auto_export_PDF.php acapella7890 316787
|
||||
#php auto_export_PDF.php acapella7890 818882
|
||||
#php auto_export_PDF.php acapella7890 823711
|
||||
#php auto_export_PDF.php acapella7890 823724
|
||||
#php auto_export_PDF.php acapella7890 824545
|
||||
#php auto_export_PDF.php acapella7890 823378
|
||||
4
html/sysadmin/votian_admin/do_auto_export_lyreco_E
Normal file
4
html/sysadmin/votian_admin/do_auto_export_lyreco_E
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
#cd /srv/www/ht/tools/
|
||||
cd /home/mps2/hansetrans/tools
|
||||
php auto_export_lyreco.php acapella7890 38174
|
||||
3
html/sysadmin/votian_admin/do_auto_export_lyreco_N
Normal file
3
html/sysadmin/votian_admin/do_auto_export_lyreco_N
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
cd /srv/www/ht/tools/
|
||||
php auto_export_lyreco.php acapella7890 33116
|
||||
4
html/sysadmin/votian_admin/do_auto_logout_by_autorevokes
Normal file
4
html/sysadmin/votian_admin/do_auto_logout_by_autorevokes
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
#cd /srv/www/sb/tools/
|
||||
cd /home/mps2/stadtbote/tools/
|
||||
php logout_cr_by_autorevokes.php acapella7890
|
||||
115
html/sysadmin/votian_admin/do_bzip2.php
Normal file
115
html/sysadmin/votian_admin/do_bzip2.php
Normal file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
|
||||
date_default_timezone_set('Europe/Berlin');
|
||||
set_time_limit(0);
|
||||
error_reporting(E_ALL & ~E_NOTICE);
|
||||
$log_file_name = "/root/votian_admin/do_bzip2_" . date("Ym") . ".log";
|
||||
$srv_root = "/home/mps2";
|
||||
|
||||
doIt("/home/htdata/mysql_hha");
|
||||
doIt("/home/htdata/mysql_stadtbote1");
|
||||
//doItEdifact("$srv_root/sb/temp/edifact");
|
||||
doItLogs("$srv_root/stadtbote/log", false);
|
||||
delete_files("$srv_root/stadtbote/temp/signs");
|
||||
delete_files("$srv_root/stadtbote/temp/captchas");
|
||||
delete_files("$srv_root/stadtbote/temp/download");
|
||||
//delete_files("$srv_root/stadtbote/temp/photos");
|
||||
|
||||
function doIt($source) {
|
||||
$filestobezipped = array();
|
||||
$max_filemtime = 0;
|
||||
|
||||
if ($handle = opendir($source)):
|
||||
while (false !== ($file = readdir($handle))):
|
||||
if (!is_dir("$source/$file")):
|
||||
list($dirname, $basename, $extension, $filename) = array_values(pathinfo($file));
|
||||
if ($filename == "mps2-bin" && substr($extension, 0, 1) == "0"):
|
||||
$filestobezipped[] = array("$source/$file", filemtime("$source/$file"));
|
||||
$max_filemtime = (filemtime("$source/$file") > $max_filemtime ? filemtime("$source/$file") : $max_filemtime);
|
||||
endif;
|
||||
endif;
|
||||
endwhile;
|
||||
closedir($handle);
|
||||
endif;
|
||||
|
||||
foreach ($filestobezipped as $filetobezipped) {
|
||||
if ($filetobezipped[1] != $max_filemtime):
|
||||
exec_cmd("bzip2 -9 " . $filetobezipped[0]);
|
||||
endif;
|
||||
}
|
||||
}
|
||||
|
||||
//function doItEdifact($source) {
|
||||
// exec_cmd("cd $source;tar -cvf \"()_edifact_" . date("Ym") . ".tar\" --exclude=*.bz2 *;bzip2 -9f \"()_edifact_" . date("Ym") . ".tar\"");
|
||||
// if (is_file("\"()_edifact_" . date("Ym", mktime(0, 0, 0, date("m") - 2, 1, date("Y"))) . ".tar\""))
|
||||
// exec_cmd("rm \"()_edifact_" . date("Ym", mktime(0, 0, 0, date("m") - 2, 1, date("Y"))) . ".tar\"");
|
||||
//
|
||||
// $filestoberemoved = array();
|
||||
// if ($handle = opendir($source)):
|
||||
// while (false !== ($file = readdir($handle))):
|
||||
// if (!is_dir("$source/$file")):
|
||||
// list($dirname, $basename, $extension, $filename) = array_values(pathinfo($file));
|
||||
// if (filemtime("$source/$file") < mktime(0, 0, 0, date("m"), 1, date("Y")) && $extension != "bz2"):
|
||||
// $filestoberemoved[] = "$source/$file";
|
||||
// endif;
|
||||
// endif;
|
||||
// endwhile;
|
||||
// closedir($handle);
|
||||
// endif;
|
||||
//
|
||||
// foreach ($filestoberemoved as $filetoberemoved) {
|
||||
// exec_cmd("rm \"" . $filetoberemoved . "\"");
|
||||
// }
|
||||
//}
|
||||
|
||||
function doItLogs($source, $do_delete = false) {
|
||||
$filestoberemoved = array();
|
||||
$filestobezipped = array();
|
||||
|
||||
if ($handle = opendir($source)):
|
||||
while (false !== ($file = readdir($handle))):
|
||||
if (!is_dir("$source/$file")):
|
||||
list($dirname, $basename, $extension, $filename) = array_values(pathinfo($file));
|
||||
if (!(strpos($basename, "_" . date("Ym", mktime(0, 0, 0, date("m") - 1, 1, date("Y")))) === false) && $extension == "log"):
|
||||
$filestobezipped[] = "$source/$file";
|
||||
elseif (!(strpos($basename, "_" . date("Ym", mktime(0, 0, 0, date("m") - 2, 1, date("Y")))) === false) && $extension == "bz2"):
|
||||
$filestoberemoved[] = "$source/$file";
|
||||
endif;
|
||||
endif;
|
||||
endwhile;
|
||||
closedir($handle);
|
||||
endif;
|
||||
|
||||
if ($do_delete)
|
||||
foreach ($filestoberemoved as $filetoberemoved) {
|
||||
exec_cmd("rm " . $filetoberemoved);
|
||||
}
|
||||
foreach ($filestobezipped as $filetobezipped) {
|
||||
exec_cmd("bzip2 -9 " . $filetobezipped);
|
||||
}
|
||||
}
|
||||
|
||||
function delete_files($filespec){
|
||||
// exec_cmd("ls $filespec | xargs rm");
|
||||
exec_cmd("find $filespec -type f -delete");
|
||||
}
|
||||
|
||||
function exec_cmd($cmd){
|
||||
global $log_file_name;
|
||||
|
||||
$cmd .= " >> $log_file_name 2>&1";
|
||||
writeLog("\"$cmd\"");
|
||||
exec($cmd);
|
||||
}
|
||||
|
||||
function writeLog($log_text)
|
||||
{
|
||||
global $log_file_name;
|
||||
|
||||
$fileHandle = @fopen($log_file_name, 'a');
|
||||
@fwrite($fileHandle, "[" . date("Y-m-d H:i:s") . "] " . $log_text . "\n");
|
||||
@fclose($fileHandle);
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
3
html/sysadmin/votian_admin/do_check_jb_permanent_moebel
Normal file
3
html/sysadmin/votian_admin/do_check_jb_permanent_moebel
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
cd /srv/www/mps1/moebel/jobs
|
||||
php check_jb_permanent.php >> /srv/www/mps1/moebel/log/check_jb_permanent_`date +%Y``date +%m`.log 2>&1
|
||||
4
html/sysadmin/votian_admin/do_cronOrderReqSendCsv
Normal file
4
html/sysadmin/votian_admin/do_cronOrderReqSendCsv
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
cd /srv/www/htm/tools/
|
||||
php cronOrderReqSendCsv.php acapella7890 >> /srv/www/htm/log/cronOrderReqSendCsv_`date +%Y``date +%m`.log 2>&1
|
||||
|
||||
4
html/sysadmin/votian_admin/do_cron_FTP_upload_HTG
Normal file
4
html/sysadmin/votian_admin/do_cron_FTP_upload_HTG
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
#cd /srv/www/ht/tools/
|
||||
cd /home/mps2/hansetrans/tools
|
||||
php cron_FTP_upload_HTG.php acapella7890
|
||||
3
html/sysadmin/votian_admin/do_cron_FTP_upload_HTM
Normal file
3
html/sysadmin/votian_admin/do_cron_FTP_upload_HTM
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
cd /srv/www/htm/tools/
|
||||
php cron_FTP_upload_HTM.php acapella7890
|
||||
3
html/sysadmin/votian_admin/do_cron_HTG_Kennziffer_95
Normal file
3
html/sysadmin/votian_admin/do_cron_HTG_Kennziffer_95
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
cd /srv/www/ht/tools/
|
||||
php auto_trigger_check_metafield_mtfk_1649_OLD.php acapella7890 HQ_ALL
|
||||
62
html/sysadmin/votian_admin/do_cron_HTG_MAILS
Normal file
62
html/sysadmin/votian_admin/do_cron_HTG_MAILS
Normal file
@@ -0,0 +1,62 @@
|
||||
#!/bin/sh
|
||||
cd /srv/www/ht/tools/
|
||||
|
||||
# EG-LIZENZ
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 101
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 102
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 103
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 104
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 105
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 106
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 107
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 108
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 109
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 110
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 111
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 112
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 HQ_ALL
|
||||
|
||||
# KENNZIFFER 95
|
||||
php auto_trigger_check_metafield_mtfk_1650.php acapella7890 101
|
||||
php auto_trigger_check_metafield_mtfk_1650.php acapella7890 102
|
||||
php auto_trigger_check_metafield_mtfk_1650.php acapella7890 103
|
||||
php auto_trigger_check_metafield_mtfk_1650.php acapella7890 104
|
||||
php auto_trigger_check_metafield_mtfk_1650.php acapella7890 105
|
||||
php auto_trigger_check_metafield_mtfk_1650.php acapella7890 106
|
||||
php auto_trigger_check_metafield_mtfk_1650.php acapella7890 107
|
||||
php auto_trigger_check_metafield_mtfk_1650.php acapella7890 108
|
||||
php auto_trigger_check_metafield_mtfk_1650.php acapella7890 109
|
||||
php auto_trigger_check_metafield_mtfk_1650.php acapella7890 110
|
||||
php auto_trigger_check_metafield_mtfk_1650.php acapella7890 111
|
||||
php auto_trigger_check_metafield_mtfk_1650.php acapella7890 112
|
||||
php auto_trigger_check_metafield_mtfk_1650.php acapella7890 HQ_ALL
|
||||
|
||||
# UN-Jahresgespräch
|
||||
php auto_trigger_check_metafield_mtfk_1652.php acapella7890 101
|
||||
php auto_trigger_check_metafield_mtfk_1652.php acapella7890 102
|
||||
php auto_trigger_check_metafield_mtfk_1652.php acapella7890 103
|
||||
php auto_trigger_check_metafield_mtfk_1652.php acapella7890 104
|
||||
php auto_trigger_check_metafield_mtfk_1652.php acapella7890 105
|
||||
php auto_trigger_check_metafield_mtfk_1652.php acapella7890 106
|
||||
php auto_trigger_check_metafield_mtfk_1652.php acapella7890 107
|
||||
php auto_trigger_check_metafield_mtfk_1652.php acapella7890 108
|
||||
php auto_trigger_check_metafield_mtfk_1652.php acapella7890 109
|
||||
php auto_trigger_check_metafield_mtfk_1652.php acapella7890 110
|
||||
php auto_trigger_check_metafield_mtfk_1652.php acapella7890 111
|
||||
php auto_trigger_check_metafield_mtfk_1652.php acapella7890 112
|
||||
php auto_trigger_check_metafield_mtfk_1652.php acapella7890 HQ_ALL
|
||||
|
||||
# Vorort-Prüfung
|
||||
php tool_vop.php acapella7890 101
|
||||
php tool_vop.php acapella7890 102
|
||||
php tool_vop.php acapella7890 103
|
||||
php tool_vop.php acapella7890 104
|
||||
php tool_vop.php acapella7890 105
|
||||
php tool_vop.php acapella7890 106
|
||||
php tool_vop.php acapella7890 107
|
||||
php tool_vop.php acapella7890 108
|
||||
php tool_vop.php acapella7890 109
|
||||
php tool_vop.php acapella7890 110
|
||||
php tool_vop.php acapella7890 111
|
||||
php tool_vop.php acapella7890 112
|
||||
php tool_vop.php acapella7890 HQ_ALL
|
||||
39
html/sysadmin/votian_admin/do_cron_HTG_STATISTIC_SPECIAL
Normal file
39
html/sysadmin/votian_admin/do_cron_HTG_STATISTIC_SPECIAL
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
cd /srv/www/ht/tools/
|
||||
|
||||
# GFL
|
||||
# php statistic_special_GFL.php acapella7890
|
||||
|
||||
# Alle Niederlassungen aufrufen
|
||||
# *** ERSTMAL ZUM TEST NUR HH ***
|
||||
# php statistic_special_NL.php acapella7890 101
|
||||
# php statistic_special_NL.php acapella7890 102
|
||||
# php statistic_special_NL.php acapella7890 103
|
||||
# php statistic_special_NL.php acapella7890 104
|
||||
# php statistic_special_NL.php acapella7890 105
|
||||
# php statistic_special_NL.php acapella7890 106
|
||||
# php statistic_special_NL.php acapella7890 107
|
||||
# php statistic_special_NL.php acapella7890 108
|
||||
# php statistic_special_NL.php acapella7890 109
|
||||
# php statistic_special_NL.php acapella7890 110
|
||||
# php statistic_special_NL.php acapella7890 111
|
||||
# php statistic_special_NL.php acapella7890 112
|
||||
|
||||
# EXTRA: Iteration über aller NLn-Übersichten für GFL
|
||||
# php statistic_special_NL_MULTI.php acapella7890
|
||||
|
||||
# Neue Version
|
||||
php statistic_special_NL_NEW.php acapella7890
|
||||
php statistic_special_NL_NEW.php acapella7890 101
|
||||
php statistic_special_NL_NEW.php acapella7890 102
|
||||
php statistic_special_NL_NEW.php acapella7890 103
|
||||
php statistic_special_NL_NEW.php acapella7890 104
|
||||
php statistic_special_NL_NEW.php acapella7890 105
|
||||
php statistic_special_NL_NEW.php acapella7890 106
|
||||
php statistic_special_NL_NEW.php acapella7890 107
|
||||
php statistic_special_NL_NEW.php acapella7890 108
|
||||
php statistic_special_NL_NEW.php acapella7890 109
|
||||
php statistic_special_NL_NEW.php acapella7890 110
|
||||
php statistic_special_NL_NEW.php acapella7890 111
|
||||
php statistic_special_NL_NEW.php acapella7890 112
|
||||
php statistic_special_NL_NEW.php acapella7890 203
|
||||
170
html/sysadmin/votian_admin/do_cron_STB_MAILS
Normal file
170
html/sysadmin/votian_admin/do_cron_STB_MAILS
Normal file
@@ -0,0 +1,170 @@
|
||||
#!/bin/sh
|
||||
cd /home/mps2/stadtbote/tools
|
||||
|
||||
# 2. Seite TRANSPORTEUR und 2. Seite FAHRZEUG
|
||||
# php auto_trigger_check_metafield.php acapella7890 1
|
||||
# php auto_trigger_check_metafield.php acapella7890 2
|
||||
# php auto_trigger_check_metafield.php acapella7890 3
|
||||
# php auto_trigger_check_metafield.php acapella7890 4
|
||||
# php auto_trigger_check_metafield.php acapella7890 5
|
||||
# php auto_trigger_check_metafield.php acapella7890 6
|
||||
# php auto_trigger_check_metafield.php acapella7890 7
|
||||
# php auto_trigger_check_metafield.php acapella7890 8
|
||||
# php auto_trigger_check_metafield.php acapella7890 9
|
||||
# php auto_trigger_check_metafield.php acapella7890 10
|
||||
# php auto_trigger_check_metafield.php acapella7890 11
|
||||
# php auto_trigger_check_metafield.php acapella7890 90
|
||||
# php auto_trigger_check_metafield.php acapella7890 HQ_ALL
|
||||
|
||||
# PBSG-FILTER
|
||||
php auto_trigger_check_metafield_mtfk_1710.php acapella7890 1
|
||||
php auto_trigger_check_metafield_mtfk_1710.php acapella7890 2
|
||||
php auto_trigger_check_metafield_mtfk_1710.php acapella7890 3
|
||||
php auto_trigger_check_metafield_mtfk_1710.php acapella7890 4
|
||||
php auto_trigger_check_metafield_mtfk_1710.php acapella7890 5
|
||||
php auto_trigger_check_metafield_mtfk_1710.php acapella7890 6
|
||||
php auto_trigger_check_metafield_mtfk_1710.php acapella7890 7
|
||||
php auto_trigger_check_metafield_mtfk_1710.php acapella7890 8
|
||||
php auto_trigger_check_metafield_mtfk_1710.php acapella7890 9
|
||||
php auto_trigger_check_metafield_mtfk_1710.php acapella7890 10
|
||||
php auto_trigger_check_metafield_mtfk_1710.php acapella7890 11
|
||||
# php auto_trigger_check_metafield_mtfk_1710.php acapella7890 90
|
||||
# php auto_trigger_check_metafield_mtfk_1710.php acapella7890 HQ_ALL
|
||||
|
||||
# Führerscheinablaufdatum
|
||||
php auto_trigger_check_metafield_mtfk_1623.php acapella7890 1
|
||||
php auto_trigger_check_metafield_mtfk_1623.php acapella7890 2
|
||||
php auto_trigger_check_metafield_mtfk_1623.php acapella7890 3
|
||||
php auto_trigger_check_metafield_mtfk_1623.php acapella7890 4
|
||||
php auto_trigger_check_metafield_mtfk_1623.php acapella7890 5
|
||||
php auto_trigger_check_metafield_mtfk_1623.php acapella7890 6
|
||||
php auto_trigger_check_metafield_mtfk_1623.php acapella7890 7
|
||||
php auto_trigger_check_metafield_mtfk_1623.php acapella7890 8
|
||||
php auto_trigger_check_metafield_mtfk_1623.php acapella7890 9
|
||||
php auto_trigger_check_metafield_mtfk_1623.php acapella7890 10
|
||||
php auto_trigger_check_metafield_mtfk_1623.php acapella7890 11
|
||||
# php auto_trigger_check_metafield_mtfk_1623.php acapella7890 90
|
||||
# php auto_trigger_check_metafield_mtfk_1623.php acapella7890 HQ_ALL
|
||||
|
||||
# Mindestlohngesetz Nachhaltungsdatum
|
||||
php auto_trigger_check_metafield_mtfk_1715.php acapella7890 8
|
||||
|
||||
# Corona-Impfung
|
||||
php auto_trigger_check_metafield_mtfk_1717.php acapella7890 1
|
||||
php auto_trigger_check_metafield_mtfk_1717.php acapella7890 2
|
||||
php auto_trigger_check_metafield_mtfk_1717.php acapella7890 3
|
||||
php auto_trigger_check_metafield_mtfk_1717.php acapella7890 4
|
||||
php auto_trigger_check_metafield_mtfk_1717.php acapella7890 5
|
||||
php auto_trigger_check_metafield_mtfk_1717.php acapella7890 6
|
||||
php auto_trigger_check_metafield_mtfk_1717.php acapella7890 7
|
||||
php auto_trigger_check_metafield_mtfk_1717.php acapella7890 8
|
||||
php auto_trigger_check_metafield_mtfk_1717.php acapella7890 9
|
||||
php auto_trigger_check_metafield_mtfk_1717.php acapella7890 10
|
||||
php auto_trigger_check_metafield_mtfk_1717.php acapella7890 11
|
||||
# php auto_trigger_check_metafield_mtfk_1717.php acapella7890 90
|
||||
# php auto_trigger_check_metafield_mtfk_1717.php acapella7890 HQ_ALL
|
||||
|
||||
# FZ-Führungszeugnis
|
||||
php auto_trigger_check_metafield_mtfk_1718.php acapella7890 1
|
||||
php auto_trigger_check_metafield_mtfk_1718.php acapella7890 2
|
||||
php auto_trigger_check_metafield_mtfk_1718.php acapella7890 3
|
||||
php auto_trigger_check_metafield_mtfk_1718.php acapella7890 4
|
||||
php auto_trigger_check_metafield_mtfk_1718.php acapella7890 5
|
||||
php auto_trigger_check_metafield_mtfk_1718.php acapella7890 6
|
||||
php auto_trigger_check_metafield_mtfk_1718.php acapella7890 7
|
||||
php auto_trigger_check_metafield_mtfk_1718.php acapella7890 8
|
||||
php auto_trigger_check_metafield_mtfk_1718.php acapella7890 9
|
||||
php auto_trigger_check_metafield_mtfk_1718.php acapella7890 10
|
||||
php auto_trigger_check_metafield_mtfk_1718.php acapella7890 11
|
||||
# php auto_trigger_check_metafield_mtfk_1718.php acapella7890 90
|
||||
# php auto_trigger_check_metafield_mtfk_1718.php acapella7890 HQ_ALL
|
||||
|
||||
# Good Distribution Practice
|
||||
php auto_trigger_check_metafield_mtfk_1719.php acapella7890 1
|
||||
php auto_trigger_check_metafield_mtfk_1719.php acapella7890 2
|
||||
php auto_trigger_check_metafield_mtfk_1719.php acapella7890 3
|
||||
php auto_trigger_check_metafield_mtfk_1719.php acapella7890 4
|
||||
php auto_trigger_check_metafield_mtfk_1719.php acapella7890 5
|
||||
php auto_trigger_check_metafield_mtfk_1719.php acapella7890 6
|
||||
php auto_trigger_check_metafield_mtfk_1719.php acapella7890 7
|
||||
php auto_trigger_check_metafield_mtfk_1719.php acapella7890 8
|
||||
php auto_trigger_check_metafield_mtfk_1719.php acapella7890 9
|
||||
php auto_trigger_check_metafield_mtfk_1719.php acapella7890 10
|
||||
php auto_trigger_check_metafield_mtfk_1719.php acapella7890 11
|
||||
# php auto_trigger_check_metafield_mtfk_1719.php acapella7890 90
|
||||
# php auto_trigger_check_metafield_mtfk_1719.php acapella7890 HQ_ALL
|
||||
|
||||
# t:m spezifische Schulungen
|
||||
php auto_trigger_check_metafield_mtfk_1720.php acapella7890 1
|
||||
php auto_trigger_check_metafield_mtfk_1720.php acapella7890 2
|
||||
php auto_trigger_check_metafield_mtfk_1720.php acapella7890 3
|
||||
php auto_trigger_check_metafield_mtfk_1720.php acapella7890 4
|
||||
php auto_trigger_check_metafield_mtfk_1720.php acapella7890 5
|
||||
php auto_trigger_check_metafield_mtfk_1720.php acapella7890 6
|
||||
php auto_trigger_check_metafield_mtfk_1720.php acapella7890 7
|
||||
php auto_trigger_check_metafield_mtfk_1720.php acapella7890 8
|
||||
php auto_trigger_check_metafield_mtfk_1720.php acapella7890 9
|
||||
php auto_trigger_check_metafield_mtfk_1720.php acapella7890 10
|
||||
php auto_trigger_check_metafield_mtfk_1720.php acapella7890 11
|
||||
# php auto_trigger_check_metafield_mtfk_1720.php acapella7890 90
|
||||
# php auto_trigger_check_metafield_mtfk_1720.php acapella7890 HQ_ALL
|
||||
|
||||
# EG-LIZENZ
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 1
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 2
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 3
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 4
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 5
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 6
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 7
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 8
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 9
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 10
|
||||
php auto_trigger_check_metafield_mtfk_1629.php acapella7890 11
|
||||
# php auto_trigger_check_metafield_mtfk_1629.php acapella7890 90
|
||||
# php auto_trigger_check_metafield_mtfk_1629.php acapella7890 HQ_ALL
|
||||
|
||||
# KENNZIFFER 95
|
||||
# php auto_trigger_check_metafield_mtfk_1650.php acapella7890 1
|
||||
# php auto_trigger_check_metafield_mtfk_1650.php acapella7890 2
|
||||
# php auto_trigger_check_metafield_mtfk_1650.php acapella7890 3
|
||||
# php auto_trigger_check_metafield_mtfk_1650.php acapella7890 4
|
||||
# php auto_trigger_check_metafield_mtfk_1650.php acapella7890 5
|
||||
# php auto_trigger_check_metafield_mtfk_1650.php acapella7890 6
|
||||
# php auto_trigger_check_metafield_mtfk_1650.php acapella7890 7
|
||||
# php auto_trigger_check_metafield_mtfk_1650.php acapella7890 8
|
||||
# php auto_trigger_check_metafield_mtfk_1650.php acapella7890 9
|
||||
# php auto_trigger_check_metafield_mtfk_1650.php acapella7890 10
|
||||
# php auto_trigger_check_metafield_mtfk_1650.php acapella7890 11
|
||||
# php auto_trigger_check_metafield_mtfk_1650.php acapella7890 90
|
||||
# php auto_trigger_check_metafield_mtfk_1650.php acapella7890 HQ_ALL
|
||||
|
||||
# UN-Jahresgespräch
|
||||
# php auto_trigger_check_metafield_mtfk_1652.php acapella7890 1
|
||||
# php auto_trigger_check_metafield_mtfk_1652.php acapella7890 2
|
||||
# php auto_trigger_check_metafield_mtfk_1652.php acapella7890 3
|
||||
# php auto_trigger_check_metafield_mtfk_1652.php acapella7890 4
|
||||
# php auto_trigger_check_metafield_mtfk_1652.php acapella7890 5
|
||||
# php auto_trigger_check_metafield_mtfk_1652.php acapella7890 6
|
||||
# php auto_trigger_check_metafield_mtfk_1652.php acapella7890 7
|
||||
# php auto_trigger_check_metafield_mtfk_1652.php acapella7890 8
|
||||
# php auto_trigger_check_metafield_mtfk_1652.php acapella7890 9
|
||||
# php auto_trigger_check_metafield_mtfk_1652.php acapella7890 10
|
||||
# php auto_trigger_check_metafield_mtfk_1652.php acapella7890 11
|
||||
# php auto_trigger_check_metafield_mtfk_1652.php acapella7890 90
|
||||
# php auto_trigger_check_metafield_mtfk_1652.php acapella7890 HQ_ALL
|
||||
|
||||
# Vorort-Prüfung
|
||||
# php tool_vop.php acapella7890 1
|
||||
# php tool_vop.php acapella7890 2
|
||||
# php tool_vop.php acapella7890 3
|
||||
# php tool_vop.php acapella7890 4
|
||||
# php tool_vop.php acapella7890 5
|
||||
# php tool_vop.php acapella7890 6
|
||||
# php tool_vop.php acapella7890 7
|
||||
# php tool_vop.php acapella7890 8
|
||||
# php tool_vop.php acapella7890 9
|
||||
# php tool_vop.php acapella7890 10
|
||||
# php tool_vop.php acapella7890 11
|
||||
# php tool_vop.php acapella7890 90
|
||||
# php tool_vop.php acapella7890 HQ_ALL
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd /home/mps2/stadtbote/tools
|
||||
|
||||
# Setzen der Filter bzgl. Corona (Impfung und Test)
|
||||
php auto_trigger_check_metafield_mtfk_1717_B.php acapella7890 HQ_ALL
|
||||
|
||||
6
html/sysadmin/votian_admin/do_cron_export_HHA
Normal file
6
html/sysadmin/votian_admin/do_cron_export_HHA
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd /home/mps2/hha/export/
|
||||
|
||||
php cron_export_HHA.php acapella7890 101
|
||||
php cron_export_HHA.php acapella7890 102
|
||||
php cron_export_HHA.php acapella7890 103
|
||||
4
html/sysadmin/votian_admin/do_cron_export_HTG
Normal file
4
html/sysadmin/votian_admin/do_cron_export_HTG
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
#cd /srv/www/ht/tools/
|
||||
cd /home/mps2/hansetrans/tools
|
||||
php cron_export_HTG.php acapella7890 today
|
||||
3
html/sysadmin/votian_admin/do_cron_export_HTM
Normal file
3
html/sysadmin/votian_admin/do_cron_export_HTM
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
cd /srv/www/htm/tools/
|
||||
php cron_export_HTM.php acapella7890 today
|
||||
3
html/sysadmin/votian_admin/do_cron_export_SB
Normal file
3
html/sysadmin/votian_admin/do_cron_export_SB
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
cd /home/mps2/stadtbote/tools
|
||||
php cron_export_SB.php acapella7890 today
|
||||
4
html/sysadmin/votian_admin/do_cron_monitor_replication
Normal file
4
html/sysadmin/votian_admin/do_cron_monitor_replication
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
#cd /srv/www/htm/sysadmin/
|
||||
cd /home/mps2/htm/sysadmin
|
||||
php cron_monitor_replication.php acapella7890 >> /home/mps2/htm/log/cron_monitor_replication_`date +%Y``date +%m`.log 2>&1
|
||||
8
html/sysadmin/votian_admin/do_cron_soap_0
Normal file
8
html/sysadmin/votian_admin/do_cron_soap_0
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
#cd /srv/www/mps1/hha/import/
|
||||
cd /home/mps2/hha/import/
|
||||
php soap.php acapella7890 1 0
|
||||
#cd /srv/www/mps1/hha_test/import/
|
||||
cd /home/mps2/hha_test/import/
|
||||
php soap.php acapella7890 1 0
|
||||
|
||||
7
html/sysadmin/votian_admin/do_cron_soap_1
Normal file
7
html/sysadmin/votian_admin/do_cron_soap_1
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
#cd /srv/www/mps1/hha/import/
|
||||
cd /home/mps2/hha/import/
|
||||
php soap.php acapella7890 1 1
|
||||
#cd /srv/www/mps1/hha_test/import/
|
||||
cd /home/mps2/hha_test/import/
|
||||
php soap.php acapella7890 1 1
|
||||
6
html/sysadmin/votian_admin/do_cron_special_HHA
Normal file
6
html/sysadmin/votian_admin/do_cron_special_HHA
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd /home/mps2/hha/illt/
|
||||
|
||||
php cron_special_HHA.php acapella7890
|
||||
|
||||
|
||||
10
html/sysadmin/votian_admin/do_cron_vht_dispo_days_HHA
Normal file
10
html/sysadmin/votian_admin/do_cron_vht_dispo_days_HHA
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
#cd /srv/www/mps1/hha/include/
|
||||
cd /home/mps2/hha/include/
|
||||
php ../include/cron_vht_dispo_days_HHA.php >> ../log/cron_vht_dispo_days_HHA_`date +%Y-%m`.log
|
||||
#cd /srv/www/mps1/hha_test/include/
|
||||
cd /home/mps2/hha_test/include/
|
||||
php ../include/cron_vht_dispo_days_HHA.php >> ../log/cron_vht_dispo_days_HHA_`date +%Y-%m`.log
|
||||
##cd /srv/www/mps1/hha_test_intern/include/
|
||||
#cd /home/mps2/hha_test_intern_include/include/
|
||||
#php ../include/cron_vht_dispo_days_HHA.php >> ../log/cron_vht_dispo_days_HHA_`date +%Y-%m`.log
|
||||
104
html/sysadmin/votian_admin/do_rsync
Normal file
104
html/sysadmin/votian_admin/do_rsync
Normal file
@@ -0,0 +1,104 @@
|
||||
#!/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 PHP7 (started on 22.10.2021)
|
||||
|
||||
rsync -e ssh -avz /home/mps2/stadtbote/jobs/*newbies.php root@172.16.0.231:/srv/htdocs/stadtbote/jobs/ >> ${log_file} 2>&1
|
||||
rsync -e ssh -avz /home/mps2/stadtbote/jobs/job_options_*.js root@172.16.0.231:/srv/htdocs/stadtbote/jobs/ >> ${log_file} 2>&1
|
||||
|
||||
# added on 04.11.2021 / cahnged on 22.12.2021: added "--delete"
|
||||
rsync -e ssh -avz --delete /home/mps2/stadtbote/import/upload/ root@172.16.0.231:/srv/htdocs/stadtbote/import/upload >> ${log_file} 2>&1
|
||||
rsync -e ssh -avz root@172.16.0.231:/srv/htdocs/stadtbote/import/upload/ /home/mps2/stadtbote/import/upload >> ${log_file} 2>&1
|
||||
|
||||
# added on 09.11.2021
|
||||
#rsync -e ssh -avz /home/mps2/stadtbote/temp/photos/ root@172.16.0.231:/srv/htdocs/stadtbote/temp/photos/ >> ${log_file} 2>&1
|
||||
#rsync -e ssh -avz root@172.16.0.231:/srv/htdocs/stadtbote/temp/photos/ /home/mps2/stadtbote/temp/photos/ >> ${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
|
||||
31
html/sysadmin/votian_admin/do_rsync.php
Normal file
31
html/sysadmin/votian_admin/do_rsync.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
date_default_timezone_set('Europe/Berlin');
|
||||
set_time_limit(0);
|
||||
|
||||
exec_cmd("rsync -e ssh -avz --bwlimit=5000 --exclude=temp/captchas --exclude=temp/signs --exclude=temp/photos root@172.16.0.122:/srv/www/sb/* /home/mps2/stadtbote/");
|
||||
exec_cmd("rsync -e ssh -avz --bwlimit=5000 --exclude=temp/captchas --exclude=temp/signs --exclude=temp/photos root@172.16.0.122:/srv/www/ht/* /home/mps2/hansetrans/");
|
||||
//exec_cmd("rsync -e ssh -avz --bwlimit=5000 --exclude=temp/captchas --exclude=temp/signs --exclude=temp/download --exclude=import/upload/HTM/mobile_pics root@172.16.0.122:/srv/www/htm/* /home/mps2/htm/");
|
||||
// 08.04.2016: Option "--exclude=documents/photos" wurde enfernt
|
||||
exec_cmd("rsync -e ssh -avz --bwlimit=5000 root@172.16.0.122:/srv/www/mps1/intern/ /home/mps2/intern/");
|
||||
exec_cmd("rsync -e ssh -avz --bwlimit=5000 root@172.16.0.122:/srv/www/mps1/timetracker/ /home/mps2/timetracker/");
|
||||
//exec_cmd("rsync -e ssh -avz --bwlimit=5000 root@172.16.0.122:/srv/www/mps1/stadtbote_auto/ /home/mps2/stadtbote_auto/");
|
||||
//exec_cmd("rsync -e ssh -avz --bwlimit=5000 root@172.16.0.122:/srv/www/mps1/moebel/ /home/mps2/moebel/");
|
||||
exec_cmd("rsync -e ssh -avz --bwlimit=5000 --exclude='*.log' --exclude='*.php' root@172.16.0.122:/root/votian_admin/ /root/votian_admin/");
|
||||
|
||||
function exec_cmd($cmd){
|
||||
|
||||
$cmd .= " >> /root/votian_admin/do_rsync.log 2>&1";
|
||||
writeLog("\"$cmd\"");
|
||||
exec($cmd);
|
||||
}
|
||||
|
||||
function writeLog($log_text)
|
||||
{
|
||||
$fileHandle = @fopen("/root/votian_admin/do_rsync.log", 'a');
|
||||
@fwrite($fileHandle, "[" . date("Y-m-d H:i:s") . "] " . $log_text . "\n");
|
||||
@fclose($fileHandle);
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
112
html/sysadmin/votian_admin/mysql_status.php
Normal file
112
html/sysadmin/votian_admin/mysql_status.php
Normal file
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
date_default_timezone_set('Europe/Berlin');
|
||||
|
||||
$status_vars = array(
|
||||
"Bytes_received", // The number of bytes received from all clients.
|
||||
"Bytes_sent", // The number of bytes sent to all clients.
|
||||
"Com_select", // The number of select Statements except "Qcache_hits".
|
||||
"Qcache_hits", // The number of query cache hits.
|
||||
"Questions", // The number of statements executed by the server.
|
||||
"Slow_queries", // The number of queries that have taken more than long_query_time seconds.
|
||||
"Threads_connected", // The number of currently open connections.
|
||||
"Uptime" // The number of seconds that the server has been up.
|
||||
);
|
||||
|
||||
|
||||
//3391 SB, 3511 HT, 3611 Möbler, 3651 HTM, 3711 intern
|
||||
foreach (array("3391") as $port) {
|
||||
|
||||
$log_name = "/root/votian_admin/mysql_status_" . $port . "_" . date("Y-m") . ".csv";
|
||||
$prev_vars = array();
|
||||
$prev_output = tail($log_name, 1);
|
||||
$prev_vars = explode(";", str_replace(",", "", $prev_output));
|
||||
//print_r($prev_vars);
|
||||
if (count($prev_vars) < 21)
|
||||
writeLog("Date;Uptime;Queries;Select_no_hit;qps;qps_now;Slow;Slow_qps;Slow_now;Threads;Cache_hits;Hits_s;Hits_now;Ratio;Ratio_now;Bytes_in;Bytes_out;KBps_in;KBps_out;KBps_in_now;KBps_out_now");
|
||||
|
||||
mysql_connect("127.0.0.1:$port", "root", "%Fidewz37%") or die (mysql_error());
|
||||
//mysql_select_db("phoenix") or die (mysql_error());
|
||||
//mysql_query('SET NAMES latin1') or die ('SET NAMES latin1');
|
||||
$sql_query = "SHOW /*!50002 GLOBAL */ STATUS";
|
||||
$res = mysql_query($sql_query) or die($sql_query . ": " . mysql_error());
|
||||
$log_text = date("Y-m-d H:i:s") . ";";
|
||||
while ($row = mysql_fetch_assoc($res)) {
|
||||
if (in_array($row['Variable_name'], $status_vars)) {
|
||||
$vars[$row['Variable_name']] = $row['Value'];
|
||||
}
|
||||
}
|
||||
mysql_free_result($res);
|
||||
|
||||
$uptime_now = $vars['Uptime'] - $prev_vars[1];
|
||||
$queries_now = $vars['Questions'] - $prev_vars[2];
|
||||
$select_now = $vars['Com_select'] - $prev_vars[3];
|
||||
$slow_now = $vars['Slow_queries'] - $prev_vars[6];
|
||||
$hits_now = $vars['Qcache_hits'] - $prev_vars[10];
|
||||
$bytes_in_now = $vars['Bytes_received'] - $prev_vars[15];
|
||||
$bytes_out_now = $vars['Bytes_sent'] - $prev_vars[16];
|
||||
|
||||
$log_text .= number_format($vars['Uptime'], 0, '.', ',') . ";";
|
||||
$log_text .= number_format($vars['Questions'], 0, '.', ',') . ";";
|
||||
$log_text .= number_format($vars['Com_select'], 0, '.', ',') . ";";
|
||||
$log_text .= number_format(round($vars['Questions'] / $vars['Uptime']), 0, '.', ',') . ";";
|
||||
$log_text .= number_format(round($queries_now / $uptime_now), 0, '.', ',') . ";";
|
||||
$log_text .= number_format($vars['Slow_queries'], 0, '.', ',') . ";";
|
||||
$log_text .= sprintf("%01.1f", round($vars['Slow_queries'] / $vars['Uptime'], 1)) . ";";
|
||||
$log_text .= number_format($slow_now, 0, '.', ',') . ";";
|
||||
$log_text .= number_format($vars['Threads_connected'], 0, '.', ',') . ";";
|
||||
$log_text .= number_format($vars['Qcache_hits'], 0, '.', ',') . ";";
|
||||
$log_text .= sprintf("%01.1f", round($vars['Qcache_hits'] / $vars['Uptime'], 1)) . ";";
|
||||
$log_text .= sprintf("%01.1f", round($hits_now / $uptime_now, 1)) . ";";
|
||||
$log_text .= sprintf("%01.1f", round($vars['Qcache_hits'] / ($vars['Qcache_hits'] + $vars['Com_select']) * 100, 1)) . ";";
|
||||
$log_text .= sprintf("%01.1f", round($hits_now / ($hits_now + $select_now) * 100, 1)) . ";";
|
||||
$log_text .= number_format($vars['Bytes_received'], 0, '.', ',') . ";";
|
||||
$log_text .= number_format($vars['Bytes_sent'], 0, '.', ',') . ";";
|
||||
$log_text .= sprintf("%01.1f", round($vars['Bytes_received'] / $vars['Uptime'] / 1024, 1)) . ";";
|
||||
$log_text .= sprintf("%01.1f", round($vars['Bytes_sent'] / $vars['Uptime'] / 1024, 1)) . ";";
|
||||
$log_text .= sprintf("%01.1f", round($bytes_in_now / $uptime_now / 1024, 1)) . ";";
|
||||
$log_text .= sprintf("%01.1f", round($bytes_out_now / $uptime_now / 1024, 1)) . "";
|
||||
writeLog($log_text);
|
||||
}
|
||||
|
||||
// http://www.codediesel.com/php/tail-functionality-in-php/
|
||||
function tail($filename, $lines = 10)
|
||||
{
|
||||
$data = '';
|
||||
$fp = @fopen($filename, "r");
|
||||
$block = 4096;
|
||||
$max = @filesize($filename);
|
||||
|
||||
for($len = 0; $len < $max; $len += $block)
|
||||
{
|
||||
$seekSize = ($max - $len > $block) ? $block : $max - $len;
|
||||
fseek($fp, ($len + $seekSize) * -1, SEEK_END);
|
||||
$data = fread($fp, $seekSize) . $data;
|
||||
|
||||
if(substr_count($data, "\n") >= $lines + 1)
|
||||
{
|
||||
/* Make sure that the last line ends with a '\n' */
|
||||
if(substr($data, strlen($data)-1, 1) !== "\n") {
|
||||
$data .= "\n";
|
||||
}
|
||||
|
||||
preg_match("!(.*?\n){". $lines ."}$!", $data, $match);
|
||||
fclose($fp);
|
||||
return $match[0];
|
||||
}
|
||||
}
|
||||
@fclose($fp);
|
||||
return $data;
|
||||
}
|
||||
|
||||
function writeLog($log_text)
|
||||
{
|
||||
global $log_name;
|
||||
|
||||
$fileHandle = @fopen($log_name, 'a');
|
||||
@fwrite($fileHandle, $log_text . "\n");
|
||||
@fclose($fileHandle);
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user