From: Chris Koeritz Date: Tue, 3 Jan 2017 16:59:12 +0000 (-0500) Subject: unified the naming system for all crontabs X-Git-Tag: 2.140.90~280 X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=commitdiff_plain;h=73af14be98174734cf030b46a91978f29ff48332 unified the naming system for all crontabs now every crontab that should produce an output file follows the form: &>>/tmp/${USER}-cron-PURPOSE.log where PURPOSE depends on what the crontab does. --- diff --git a/infobase/configuration/cron/backup_git_account.crontab b/infobase/configuration/cron/backup_git_account.crontab index c7536f46..ab75d0bc 100644 --- a/infobase/configuration/cron/backup_git_account.crontab +++ b/infobase/configuration/cron/backup_git_account.crontab @@ -1,5 +1,5 @@ #[backup git account] # archives the whole ~git folder with all account databases into a compressed tar file. -34 20 * * 5 tar -czf /z/stuffing/archives/git_archive_$(date +"\%Y_\%m_\%d_\%H\%M_\%S" | tr -d '/\n/').tar.gz /home/git >/home/git/archiving_log.txt +34 20 * * 5 tar -czf /z/stuffing/archives/git_archive_$(date +"\%Y_\%m_\%d_\%H\%M_\%S" | tr -d '/\n/').tar.gz /home/git &>>/tmp/${USER}-cron-backup_git_account.log diff --git a/infobase/configuration/cron/backup_mysql_databases.crontab b/infobase/configuration/cron/backup_mysql_databases.crontab index e4a8f21d..4bca961e 100644 --- a/infobase/configuration/cron/backup_mysql_databases.crontab +++ b/infobase/configuration/cron/backup_mysql_databases.crontab @@ -1,5 +1,5 @@ #[backup mysql databases] # backs up all of our mysql databases on a weekly basis. -28 4 * * 2 (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; mysqldump -u root '-pPASSWORD' --all-databases | gzip > /z/stuffing/archives/database_backup_$(hostname)_$(date_stringer).sql.gz) &>/tmp/database_backup_${USER}.log +28 4 * * 2 (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; mysqldump -u root '-pPASSWORD' --all-databases | gzip > /z/stuffing/archives/database_backup_$(hostname)_$(date_stringer).sql.gz) &>>/tmp/${USER}-cron-backup_mysql_databases.log diff --git a/infobase/configuration/cron/backup_photo_albums.crontab b/infobase/configuration/cron/backup_photo_albums.crontab index 6702dee8..32a52004 100644 --- a/infobase/configuration/cron/backup_photo_albums.crontab +++ b/infobase/configuration/cron/backup_photo_albums.crontab @@ -1,5 +1,5 @@ #[backup photo albums] # back up the pictures in coppermine gallery every month. -34 6 4 * * (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; tar -czf /z/stuffing/archives/photo_albums_backup_$(date_stringer).tar.gz /home/albums ; refred) &>/tmp/albums_backup_${USER}.log +34 6 4 * * (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; tar -czf /z/stuffing/archives/photo_albums_backup_$(date_stringer).tar.gz /home/albums ; refred) &>>/tmp/${USER}-cron-backup_photo_albums.log diff --git a/infobase/configuration/cron/backup_serene_system.crontab b/infobase/configuration/cron/backup_serene_system.crontab index b75b3400..146a16d4 100644 --- a/infobase/configuration/cron/backup_serene_system.crontab +++ b/infobase/configuration/cron/backup_serene_system.crontab @@ -1,5 +1,5 @@ #[backup serene system] # backs up config files and important parts of home directories to off-machine storage. -14 2 * * */7 (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; bash $HOME/feisty_meow/scripts/archival/serene_backer_upper.sh) &>/tmp/offmachine_backup.log +14 2 * * */7 (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; bash $HOME/feisty_meow/scripts/archival/serene_backer_upper.sh) &>>/tmp/${USER}-cron-backup_serene_system.log diff --git a/infobase/configuration/cron/backup_trac.crontab b/infobase/configuration/cron/backup_trac.crontab index 2ca58273..992446a8 100644 --- a/infobase/configuration/cron/backup_trac.crontab +++ b/infobase/configuration/cron/backup_trac.crontab @@ -1,5 +1,5 @@ #[backup trac] # backs up trac every week. -28 7 * * 2 bash $HOME/feisty_meow/scripts/archival/backup_trac.sh /home/trac /z/stuffing/archives +28 7 * * 2 bash $HOME/feisty_meow/scripts/archival/backup_trac.sh /home/trac /z/stuffing/archives &>>/tmp/${USER}-cron-backup_trac.log diff --git a/infobase/configuration/cron/bookmarks_builder.crontab b/infobase/configuration/cron/bookmarks_builder.crontab index e1458436..acd7cc04 100644 --- a/infobase/configuration/cron/bookmarks_builder.crontab +++ b/infobase/configuration/cron/bookmarks_builder.crontab @@ -1,5 +1,5 @@ #[bookmarks builder] # regenerate the bookmarks pages. -24 10 * * * (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; bash $HOME/feisty_meow/scripts/bookmarks/create_marks.sh ) &>>/tmp/zz_bookmarkingering_$USER.log +24 10 * * * (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; bash $HOME/feisty_meow/scripts/bookmarks/create_marks.sh ) &>>/tmp/${USER}-cron-bookmarks_builder.log diff --git a/infobase/configuration/cron/chkrootkit.crontab b/infobase/configuration/cron/chkrootkit.crontab index 6200addd..778a2648 100644 --- a/infobase/configuration/cron/chkrootkit.crontab +++ b/infobase/configuration/cron/chkrootkit.crontab @@ -2,6 +2,6 @@ #[chkrootkit] # this runs chkrootkit to demonstrate a bug in the vm kernel currently # provided by...? hmmm: who's the vendor? -3 * * * * (/usr/sbin/chkrootkit -q &>/var/www/rootkit_report_quiet.txt ) -4 * * * * (/usr/sbin/chkrootkit -x &>/var/www/rootkit_report_expert.txt ) +3 * * * * (/usr/sbin/chkrootkit -q &>/var/www/rootkit_report_quiet.txt ) &>>/tmp/${USER}-cron-chkrootkit.log +4 * * * * (/usr/sbin/chkrootkit -x &>/var/www/rootkit_report_expert.txt ) &>>/tmp/${USER}-cron-chkrootkit.log diff --git a/infobase/configuration/cron/doxygen.crontab b/infobase/configuration/cron/doxygen.crontab index 3b55e5c9..fa51d99a 100644 --- a/infobase/configuration/cron/doxygen.crontab +++ b/infobase/configuration/cron/doxygen.crontab @@ -1,6 +1,6 @@ #[doxygen] # update the feisty meow documentation once on each of tuesday, thursday and saturday. -20 4 * * 2,4,6 (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; cd $HOME/feisty_meow/documentation; make) &>>/tmp/zz_doxy_make_$USER.log +20 4 * * 2,4,6 (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; cd $HOME/feisty_meow/documentation; make) &>>/tmp/${USER}-cron-doxygen.log diff --git a/infobase/configuration/cron/emit_crontab.crontab b/infobase/configuration/cron/emit_crontab.crontab index 0baeff81..627d16dc 100644 --- a/infobase/configuration/cron/emit_crontab.crontab +++ b/infobase/configuration/cron/emit_crontab.crontab @@ -1,5 +1,5 @@ #[emit crontab] # meta-operation to backup the crontab file using cron itself. -28 */8 * * * crontab -l >$HOME/$USER.crontab +28 */8 * * * crontab -l >$HOME/$(hostname).$USER.crontab diff --git a/infobase/configuration/cron/letsencrypt_renewal.crontab b/infobase/configuration/cron/letsencrypt_renewal.crontab index e7d08da5..18a43ef6 100644 --- a/infobase/configuration/cron/letsencrypt_renewal.crontab +++ b/infobase/configuration/cron/letsencrypt_renewal.crontab @@ -1,5 +1,5 @@ #[letsencrypt renewal] # run the letsencrypt certificate renewal process every 4 hours. -37 */4 * * * letsencrypt renew &>>/tmp/letsencrypt_last_run.txt +37 */4 * * * letsencrypt renew &>>/tmp/${USER}-cron-letsencrypt_renewal.log diff --git a/infobase/configuration/cron/mailman_attribute_fix.crontab b/infobase/configuration/cron/mailman_attribute_fix.crontab index 1fbac1e9..72ea73e8 100644 --- a/infobase/configuration/cron/mailman_attribute_fix.crontab +++ b/infobase/configuration/cron/mailman_attribute_fix.crontab @@ -1,5 +1,5 @@ #[mailman attribute fix] -# fix the mailman binaries. +# fix the mailman log files so that an obnoxious bug doesn't happen on the mailman web site. 23 5 * * * chmod -R 02775 /var/lib/mailman/logs &>/dev/null diff --git a/infobase/configuration/cron/opensim_restart.crontab b/infobase/configuration/cron/opensim_restart.crontab index c6e693f0..8a91afbf 100644 --- a/infobase/configuration/cron/opensim_restart.crontab +++ b/infobase/configuration/cron/opensim_restart.crontab @@ -1,5 +1,5 @@ #[opensim restart] # ensure opensim is started if we can't detect it as running. -*/5 * * * * export FOOP=/tmp/opensim_restart_$USER.log; export LIGHTWEIGHT_INIT=true; source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh &>>$FOOP ; bash $HOME/feisty_meow/scripts/opensim/maybe_restart_opensim.sh &>>$FOOP ; /bin/chmod g+w $FOOP +*/5 * * * * (export LIGHTWEIGHT_INIT=true; source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; bash $HOME/feisty_meow/scripts/opensim/maybe_restart_opensim.sh) &>>/tmp/${USER}-cron-opensim_restart.log diff --git a/infobase/configuration/cron/pack_feisty_for_web.crontab b/infobase/configuration/cron/pack_feisty_for_web.crontab index c53678f1..1f90527c 100644 --- a/infobase/configuration/cron/pack_feisty_for_web.crontab +++ b/infobase/configuration/cron/pack_feisty_for_web.crontab @@ -1,5 +1,5 @@ #[pack feisty for web] # this packs up our source code distributions every 8 days. -16 22 */8 * * (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; bash $HOME/feisty_meow/scripts/archival/pack_feisty_meow.sh) &>$TMP/zz_packing_cron.log +16 22 */8 * * (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; bash $HOME/feisty_meow/scripts/archival/pack_feisty_meow.sh) &>>/tmp/${USER}-cron-pack_feisty_for_web.log diff --git a/infobase/configuration/cron/process_check.crontab b/infobase/configuration/cron/process_check.crontab index 509a605d..131df39c 100644 --- a/infobase/configuration/cron/process_check.crontab +++ b/infobase/configuration/cron/process_check.crontab @@ -1,5 +1,5 @@ #[process check] # a crontab for periodically dumping the process state. -* * * * * (export LIGHTWEIGHT_INIT=true; source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; bash $HOME/feisty_meow/scripts/processes/show_hot_ones.sh) &>>/home/$USER/zz_hot_processes.log +* * * * * (export LIGHTWEIGHT_INIT=true; source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; bash $HOME/feisty_meow/scripts/processes/show_hot_ones.sh) &>>/tmp/${USER}-cron-active_processes.log diff --git a/infobase/configuration/cron/random_sound.crontab b/infobase/configuration/cron/random_sound.crontab index 5753856c..106dbf97 100644 --- a/infobase/configuration/cron/random_sound.crontab +++ b/infobase/configuration/cron/random_sound.crontab @@ -1,4 +1,4 @@ #[random sound] -* * * * * (export LIGHTWEIGHT_INIT=true; source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; bash $HOME/feisty_meow/scripts/multimedia/randomly_play.sh) &>>/tmp/zz_random_sound_$USER.log +* * * * * (export LIGHTWEIGHT_INIT=true; source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; bash $HOME/feisty_meow/scripts/multimedia/randomly_play.sh) &>>/tmp/${USER}-cron-random_sound.log diff --git a/infobase/configuration/cron/snarf_linux_configuration.crontab b/infobase/configuration/cron/snarf_linux_configuration.crontab index 554f914f..c670cb5f 100644 --- a/infobase/configuration/cron/snarf_linux_configuration.crontab +++ b/infobase/configuration/cron/snarf_linux_configuration.crontab @@ -1,5 +1,5 @@ #[snarf linux configuration] # do a backup of the linux configuration files once a week. -28 7 * * 4 (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; cd /z/stuffing/archives; perl $HOME/feisty_meow/scripts/archival/snarf_linux_config.pl) &>>/tmp/zz_linux_config_snarf_$USER.log +28 7 * * 4 (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; cd /z/stuffing/archives; perl $HOME/feisty_meow/scripts/archival/snarf_linux_config.pl) &>>/tmp/${USER}-cron-snarf_linux_configuration.log diff --git a/infobase/configuration/cron/tell_zooty_our_ip.crontab b/infobase/configuration/cron/tell_zooty_our_ip.crontab index 477b0a5c..a6c31a1c 100644 --- a/infobase/configuration/cron/tell_zooty_our_ip.crontab +++ b/infobase/configuration/cron/tell_zooty_our_ip.crontab @@ -1,5 +1,5 @@ #[tell zooty our ip] # firewall host only--inform serene/zooty of our home IP address to enable back-connections. -0,14,28,42,56 * * * * (bash /home/fred/feisty_meow/scripts/security/tell_zooty_our_ip.sh serene.feistymeow.org fred fred ) &>>/tmp/zooty_tell_report.txt +0,14,28,42,56 * * * * (bash /home/fred/feisty_meow/scripts/security/tell_zooty_our_ip.sh serene.feistymeow.org fred fred ) &>>/tmp/${USER}-cron-tell_zooty_our_ip.log diff --git a/infobase/configuration/cron/time_synch.crontab b/infobase/configuration/cron/time_synch.crontab index aca7618e..8b4ff038 100644 --- a/infobase/configuration/cron/time_synch.crontab +++ b/infobase/configuration/cron/time_synch.crontab @@ -1,14 +1,14 @@ -#[time synch crontab] +#[time synch] # standard to synch to local machine. -0,4,8,12,16,20,24,28,32,36,40,44,48,52,56 * * * * /usr/sbin/sntp -P no -r greendragon -or -0,4,8,12,16,20,24,28,32,36,40,44,48,52,56 * * * * /usr/bin/rdate -s -n greendragon +#0,4,8,12,16,20,24,28,32,36,40,44,48,52,56 * * * * /usr/sbin/sntp -P no -r greendragon &>>/tmp/${USER}-cron-time_synch.log +#or +0,4,8,12,16,20,24,28,32,36,40,44,48,52,56 * * * * /usr/bin/rdate -s -n greendragon &>>/tmp/${USER}-cron-time_synch.log # -n is nntp which may not work with govt servers. # one machine on the network uses this version, to synch externally. -#0 0,4,8,12,16,20 * * * /usr/sbin/sntp -P no -r time.nist.gov +#0 0,4,8,12,16,20 * * * /usr/sbin/sntp -P no -r time.nist.gov &>>/tmp/${USER}-cron-time_synch.log #or -0 0,4,8,12,16,20 * * * /usr/bin/rdate -s time-c.nist.gov +0 0,4,8,12,16,20 * * * /usr/bin/rdate -s time-c.nist.gov &>>/tmp/${USER}-cron-time_synch.log diff --git a/infobase/configuration/cron/uptime_report.crontab b/infobase/configuration/cron/uptime_report.crontab index 32bd5092..1494c34c 100644 --- a/infobase/configuration/cron/uptime_report.crontab +++ b/infobase/configuration/cron/uptime_report.crontab @@ -1,5 +1,5 @@ #[uptime report] # the script writes the current time and current uptime to the log file. -0 * * * * (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; bash $HOME/feisty_meow/scripts/system/write_uptime_report.sh) &>>/tmp/zz_uptime_report_$USER.log +0 * * * * (source $HOME/feisty_meow/scripts/core/launch_feisty_meow.sh; bash $HOME/feisty_meow/scripts/system/write_uptime_report.sh) &>>/tmp/${USER}-cron-uptime_report.log