From: Chris Koeritz Date: Thu, 18 Oct 2018 16:39:01 +0000 (-0400) Subject: cleanups and new periodic reboot crontab X-Git-Tag: 2.140.115^2~83 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=349134c5f00fa483dd75659428a1ab0c58657015;p=feisty_meow.git cleanups and new periodic reboot crontab --- diff --git a/infobase/configuration/cron/aa_cron_defaults.crontab b/infobase/configuration/cron/aa_cron_defaults.crontab index c8ff3ebe..a6ba6849 100644 --- a/infobase/configuration/cron/aa_cron_defaults.crontab +++ b/infobase/configuration/cron/aa_cron_defaults.crontab @@ -62,10 +62,5 @@ FEISTY_MEOW_APEX=/opt/feistymeow.org/feisty_meow # below is a live example which we almost always include, so it's embedded # here for convenience. -#[nechung fortune] -# runs every minute and recreates a fortune for thunderbird signature. -# a lot of the detail below is to get the feisty meow environment loaded for -# the new_sig command. -* * * * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; perl $FEISTY_MEOW_SCRIPTS/text/new_sig.pl) &>>/tmp/${CRONUSER}-cron-nechung_fortune.log - +############## diff --git a/infobase/configuration/cron/backup_git_account.crontab b/infobase/configuration/cron/backup_git_account.crontab index a08e239a..ae28d562 100644 --- a/infobase/configuration/cron/backup_git_account.crontab +++ b/infobase/configuration/cron/backup_git_account.crontab @@ -1,5 +1,9 @@ +############## + #[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 &>>/tmp/${CRONUSER}-cron-backup_git_account.log +############## + diff --git a/infobase/configuration/cron/backup_maildir.crontab b/infobase/configuration/cron/backup_maildir.crontab index 5e9e501d..a8af8d69 100644 --- a/infobase/configuration/cron/backup_maildir.crontab +++ b/infobase/configuration/cron/backup_maildir.crontab @@ -1,5 +1,9 @@ +############## + #[backup maildir] # backs up the maildir folder for fred bi-monthly. 8 4 3,14 * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; tar -czf /z/stuffing/archives/maildir_backup_$(date_stringer).tar.gz $HOME/Maildir) &>/tmp/${CRONUSER}-cron-backup_maildir.log +############## + diff --git a/infobase/configuration/cron/backup_mailman.crontab b/infobase/configuration/cron/backup_mailman.crontab index 4eade1b1..3a8b4831 100644 --- a/infobase/configuration/cron/backup_mailman.crontab +++ b/infobase/configuration/cron/backup_mailman.crontab @@ -1,6 +1,10 @@ +############## + #[backup_mailman_archives] # creates a monthly backup of all the mailman list server's archives. 14 2 28 * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; tar -czf /z/stuffing/archives/mailman_backup_$(hostname)_$(date_stringer).tar.gz /var/lib/mailman ) &>/tmp/${CRONUSER}-cron-mailman_backup.log +############## + diff --git a/infobase/configuration/cron/backup_mysql_databases.crontab b/infobase/configuration/cron/backup_mysql_databases.crontab index 4f9c3b10..be5ffcf9 100644 --- a/infobase/configuration/cron/backup_mysql_databases.crontab +++ b/infobase/configuration/cron/backup_mysql_databases.crontab @@ -1,5 +1,9 @@ +############## + #[backup mysql databases] # backs up all of our mysql databases on a weekly basis. 28 4 * * 2 (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; mysqldump -u root '-pPASSWORD' --all-databases | gzip > /z/stuffing/archives/database_backup_$(hostname)_$(date_stringer).sql.gz) &>>/tmp/${CRONUSER}-cron-backup_mysql_databases.log +############## + diff --git a/infobase/configuration/cron/backup_photo_albums.crontab b/infobase/configuration/cron/backup_photo_albums.crontab index 8a51b931..b93e56ff 100644 --- a/infobase/configuration/cron/backup_photo_albums.crontab +++ b/infobase/configuration/cron/backup_photo_albums.crontab @@ -1,5 +1,9 @@ +############## + #[backup photo albums] # back up the pictures in coppermine gallery every month. 34 6 4 * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; tar -czf /z/stuffing/archives/photo_albums_backup_$(date_stringer).tar.gz /home/albums ; refred) &>>/tmp/${CRONUSER}-cron-backup_photo_albums.log +############## + diff --git a/infobase/configuration/cron/backup_serene_system.crontab b/infobase/configuration/cron/backup_serene_system.crontab index 7742731d..e6ae20ed 100644 --- a/infobase/configuration/cron/backup_serene_system.crontab +++ b/infobase/configuration/cron/backup_serene_system.crontab @@ -1,5 +1,9 @@ +############## + #[backup serene system] # backs up config files and important parts of home directories to off-machine storage. 14 2 * * */7 (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; bash $FEISTY_MEOW_SCRIPTS/archival/serene_backer_upper.sh) &>>/tmp/${CRONUSER}-cron-backup_serene_system.log +############## + diff --git a/infobase/configuration/cron/backup_trac.crontab b/infobase/configuration/cron/backup_trac.crontab index 8fcd8b24..2d4f5def 100644 --- a/infobase/configuration/cron/backup_trac.crontab +++ b/infobase/configuration/cron/backup_trac.crontab @@ -1,5 +1,9 @@ +############## + #[backup trac] # backs up trac every week. 28 7 * * 2 bash $FEISTY_MEOW_APEX/scripts/archival/backup_trac.sh /home/trac /z/stuffing/archives &>>/tmp/${CRONUSER}-cron-backup_trac.log +############## + diff --git a/infobase/configuration/cron/bookmarks_builder.crontab b/infobase/configuration/cron/bookmarks_builder.crontab index 29f4fde3..9f54bb87 100644 --- a/infobase/configuration/cron/bookmarks_builder.crontab +++ b/infobase/configuration/cron/bookmarks_builder.crontab @@ -1,5 +1,9 @@ +############## + #[bookmarks builder] # regenerate the bookmarks pages. 24 10 * * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; bash $FEISTY_MEOW_SCRIPTS/bookmarks/create_marks.sh ) &>>/tmp/${CRONUSER}-cron-bookmarks_builder.log +############## + diff --git a/infobase/configuration/cron/chkrootkit.crontab b/infobase/configuration/cron/chkrootkit.crontab index 1087ce00..69e3b76e 100644 --- a/infobase/configuration/cron/chkrootkit.crontab +++ b/infobase/configuration/cron/chkrootkit.crontab @@ -1,7 +1,11 @@ +############## + #[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 ) &>>/tmp/${CRONUSER}-cron-chkrootkit.log 4 * * * * (/usr/sbin/chkrootkit -x &>/var/www/rootkit_report_expert.txt ) &>>/tmp/${CRONUSER}-cron-chkrootkit.log +############## + diff --git a/infobase/configuration/cron/doxygen.crontab b/infobase/configuration/cron/doxygen.crontab index 035ee8e6..02770c81 100644 --- a/infobase/configuration/cron/doxygen.crontab +++ b/infobase/configuration/cron/doxygen.crontab @@ -1,6 +1,10 @@ +############## + #[doxygen] # update the feisty meow documentation once on each of tuesday, thursday and saturday. 20 4 * * 2,4,6 (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; cd $FEISTY_MEOW_APEX/documentation; make) &>>/tmp/${CRONUSER}-cron-doxygen.log +############## + diff --git a/infobase/configuration/cron/emit_crontab.crontab b/infobase/configuration/cron/emit_crontab.crontab index 152dd4b0..99c15e3e 100644 --- a/infobase/configuration/cron/emit_crontab.crontab +++ b/infobase/configuration/cron/emit_crontab.crontab @@ -1,5 +1,9 @@ +############## + #[emit crontab] # meta-operation to backup the crontab file using cron itself. 28 */8 * * * crontab -l >$HOME/$(hostname).$CRONUSER.crontab +############## + diff --git a/infobase/configuration/cron/letsencrypt_renewal.crontab b/infobase/configuration/cron/letsencrypt_renewal.crontab index 4a343de0..450f08b2 100644 --- a/infobase/configuration/cron/letsencrypt_renewal.crontab +++ b/infobase/configuration/cron/letsencrypt_renewal.crontab @@ -1,5 +1,9 @@ +############## + #[letsencrypt renewal] # run the letsencrypt certificate renewal process every 4 hours. 37 */4 * * * letsencrypt renew &>>/tmp/${CRONUSER}-cron-letsencrypt_renewal.log +############## + diff --git a/infobase/configuration/cron/mailman_attribute_fix.crontab b/infobase/configuration/cron/mailman_attribute_fix.crontab index 72ea73e8..b0048a66 100644 --- a/infobase/configuration/cron/mailman_attribute_fix.crontab +++ b/infobase/configuration/cron/mailman_attribute_fix.crontab @@ -1,5 +1,9 @@ +############## + #[mailman attribute fix] # 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/nechung_fortune.crontab b/infobase/configuration/cron/nechung_fortune.crontab index 8a4feee5..c8601f16 100644 --- a/infobase/configuration/cron/nechung_fortune.crontab +++ b/infobase/configuration/cron/nechung_fortune.crontab @@ -1,7 +1,11 @@ +############## + #[nechung fortune] # runs every minute and recreates a fortune for thunderbird signature. # a lot of the detail below is to get the feisty meow environment loaded for # the new_sig command. * * * * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; perl $FEISTY_MEOW_SCRIPTS/text/new_sig.pl) &>>/tmp/${CRONUSER}-cron-nechung_fortune.log +############## + diff --git a/infobase/configuration/cron/opensim_restart.crontab b/infobase/configuration/cron/opensim_restart.crontab index e3a64113..d6f56391 100644 --- a/infobase/configuration/cron/opensim_restart.crontab +++ b/infobase/configuration/cron/opensim_restart.crontab @@ -1,5 +1,9 @@ +############## + #[opensim restart] # ensure opensim is started if we can't detect it as running. */5 * * * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; bash $FEISTY_MEOW_SCRIPTS/opensim/maybe_restart_opensim.sh) &>>/tmp/${CRONUSER}-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 9b5130e7..1913bd24 100644 --- a/infobase/configuration/cron/pack_feisty_for_web.crontab +++ b/infobase/configuration/cron/pack_feisty_for_web.crontab @@ -1,5 +1,9 @@ +############## + #[pack feisty for web] # this packs up our source code distributions every 8 days. 16 22 */8 * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; bash $FEISTY_MEOW_SCRIPTS/archival/pack_feisty_meow.sh) &>>/tmp/${CRONUSER}-cron-pack_feisty_for_web.log +############## + diff --git a/infobase/configuration/cron/periodic_reboot.crontab b/infobase/configuration/cron/periodic_reboot.crontab new file mode 100644 index 00000000..a8d15079 --- /dev/null +++ b/infobase/configuration/cron/periodic_reboot.crontab @@ -0,0 +1,11 @@ + +############## + +# [periodic reboot] +# invigorates a shaky machine that cannot run longer than a certain time period. +# version below reboots every two days, somewhat. +20 4 * * 0,2,4,6 (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; sep; echo periodic reboot running at $(date) ; sep; sync; sleep 2; /sbin/reboot) &>>$HOME/${CRONUSER}-cron-periodic_reboot.log + +############## + + diff --git a/infobase/configuration/cron/process_check.crontab b/infobase/configuration/cron/process_check.crontab index 39e1ed75..3fde27b6 100644 --- a/infobase/configuration/cron/process_check.crontab +++ b/infobase/configuration/cron/process_check.crontab @@ -1,5 +1,9 @@ +############## + #[process check] # a crontab for periodically dumping the process state. * * * * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; bash $FEISTY_MEOW_SCRIPTS/processes/show_hot_ones.sh) &>>/tmp/${CRONUSER}-cron-active_processes.log +############## + diff --git a/infobase/configuration/cron/random_sound.crontab b/infobase/configuration/cron/random_sound.crontab index fe1e07b5..a61613b9 100644 --- a/infobase/configuration/cron/random_sound.crontab +++ b/infobase/configuration/cron/random_sound.crontab @@ -1,4 +1,8 @@ +############## + #[random sound] * * * * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; bash $FEISTY_MEOW_SCRIPTS/multimedia/randomly_play.sh) &>>/tmp/${CRONUSER}-cron-random_sound.log +############## + diff --git a/infobase/configuration/cron/snarf_linux_configuration.crontab b/infobase/configuration/cron/snarf_linux_configuration.crontab index bf7dcc3e..7b61de29 100644 --- a/infobase/configuration/cron/snarf_linux_configuration.crontab +++ b/infobase/configuration/cron/snarf_linux_configuration.crontab @@ -1,5 +1,9 @@ +############## + #[snarf linux configuration] # do a backup of the linux configuration files once a week. 28 7 * * 4 (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; cd /z/stuffing/archives; perl $FEISTY_MEOW_SCRIPTS/archival/snarf_linux_config.pl) &>>/tmp/${CRONUSER}-cron-snarf_linux_configuration.log +############## + diff --git a/infobase/configuration/cron/synch_and_swim_downstream.crontab b/infobase/configuration/cron/synch_and_swim_downstream.crontab index 222d7c6f..196d241f 100644 --- a/infobase/configuration/cron/synch_and_swim_downstream.crontab +++ b/infobase/configuration/cron/synch_and_swim_downstream.crontab @@ -1,4 +1,6 @@ +############## + #[synch and swim downstream] # updates local code repositories from master versions before uploading any changes to downstream # repositories, such as sourceforge or github. the uploading process (which we think of as sending @@ -6,3 +8,5 @@ # our makefiles. that's why the code below relies on the top-level makefile in home. 14 * * * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; cd $HOME ; bash $FEISTY_MEOW_SCRIPTS/rev_control/rgetem.sh ; make ) &>>/tmp/${CRONUSER}-cron-synch_and_swim_downstream.log +############## + diff --git a/infobase/configuration/cron/tell_zooty_our_ip.crontab b/infobase/configuration/cron/tell_zooty_our_ip.crontab index bf625c30..931023a1 100644 --- a/infobase/configuration/cron/tell_zooty_our_ip.crontab +++ b/infobase/configuration/cron/tell_zooty_our_ip.crontab @@ -1,5 +1,9 @@ +############## + #[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 $FEISTY_MEOW_APEX/scripts/security/tell_zooty_our_ip.sh serene.feistymeow.org fred $CRONUSER ) &>>/tmp/${CRONUSER}-cron-tell_zooty_our_ip.log +############## + diff --git a/infobase/configuration/cron/time_synch.crontab b/infobase/configuration/cron/time_synch.crontab index f5927062..7b5fd6fe 100644 --- a/infobase/configuration/cron/time_synch.crontab +++ b/infobase/configuration/cron/time_synch.crontab @@ -1,16 +1,18 @@ -#[time synch] +############## -# standard to synch to local machine. +#[time synch] -############## +LOCAL_TIME_SERVER=greendragon -# synchronize time/date with our nearest time server. -*/4 * * * * /usr/sbin/ntpdate greendragon &>>/tmp/${CRONUSER}-cron-time_synch.log +# standard version synchs to a local machine. can be used on a network +# to get time from central host. +*/4 * * * * /usr/sbin/ntpdate $LOCAL_TIME_SERVER &>>/tmp/${CRONUSER}-cron-time_synch.log ############## -# one machine on the network uses this version, to synch externally. +# the central host machine uses this version, to synch time externally. 0 0,4,8,12,16,20 * * * /usr/bin/rdate -s time.nist.gov &>>/tmp/${CRONUSER}-cron-time_synch.log -#hmmm: is above still correct? + +############## diff --git a/infobase/configuration/cron/update_apt_based_linux.crontab b/infobase/configuration/cron/update_apt_based_linux.crontab index cb6568c8..2e2ae02e 100644 --- a/infobase/configuration/cron/update_apt_based_linux.crontab +++ b/infobase/configuration/cron/update_apt_based_linux.crontab @@ -1,7 +1,10 @@ +############## #[update apt based linux crontab] # does a daily update of an apt-based linux box at pi o'clock. 14 3 * * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; bash $FEISTY_MEOW_SCRIPTS/system/naive_system_updater.sh) &>>/tmp/${CRONUSER}-cron-update_aptbased_linux.log +############## + diff --git a/infobase/configuration/cron/uptime_report.crontab b/infobase/configuration/cron/uptime_report.crontab index e1b31a67..3605e648 100644 --- a/infobase/configuration/cron/uptime_report.crontab +++ b/infobase/configuration/cron/uptime_report.crontab @@ -1,5 +1,9 @@ +############## + #[uptime report] # the script writes the current time and current uptime to the log file. 0 * * * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; bash $FEISTY_MEOW_SCRIPTS/system/write_uptime_report.sh) &>>/tmp/${CRONUSER}-cron-uptime_report.log +############## + diff --git a/infobase/configuration/cron/web_group_perm_fix.crontab b/infobase/configuration/cron/web_group_perm_fix.crontab index a46493ef..c3453d2f 100644 --- a/infobase/configuration/cron/web_group_perm_fix.crontab +++ b/infobase/configuration/cron/web_group_perm_fix.crontab @@ -1,5 +1,9 @@ +############## + #[web group perm fix] # fix the web directories for group access. 0 * * * * chmod -R g+w /var/www &>/dev/null +############## +