From 480c3c365f528504de73e8c31beef7c0c9fa5c46 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Sun, 22 May 2022 15:33:54 -0400 Subject: [PATCH] cleaned up some example crontabs --- .../configuration/cron/aa_cron_defaults.crontab | 2 +- .../cron/backup_git_account.crontab | 2 +- .../configuration/cron/backup_maildir.crontab | 2 +- .../cron/backup_mysql_databases.crontab | 6 +++--- .../cron/backup_photo_albums.crontab | 2 +- .../cron/backup_serene_system.crontab | 2 +- infobase/configuration/cron/backup_trac.crontab | 2 +- .../configuration/cron/bookmarks_builder.crontab | 2 +- infobase/configuration/cron/emit_crontab.crontab | 2 +- .../cron/letsencrypt_renewal.crontab | 2 +- .../cron/mailman_attribute_fix.crontab | 2 +- .../configuration/cron/nechung_fortune.crontab | 2 +- .../configuration/cron/opensim_restart.crontab | 2 +- .../cron/pack_feisty_for_web.crontab | 2 +- .../configuration/cron/periodic_reboot.crontab | 2 +- .../configuration/cron/process_check.crontab | 2 +- infobase/configuration/cron/random_sound.crontab | 2 +- .../cron/snarf_linux_configuration.crontab | 2 +- .../cron/synch_and_swim_downstream.crontab | 2 +- .../configuration/cron/tell_zooty_our_ip.crontab | 2 +- infobase/configuration/cron/time_synch.crontab | 16 ++++++++++++++-- .../cron/update_apt_based_linux.crontab | 2 +- .../configuration/cron/uptime_report.crontab | 2 +- .../cron/web_group_perm_fix.crontab | 2 +- 24 files changed, 39 insertions(+), 27 deletions(-) diff --git a/infobase/configuration/cron/aa_cron_defaults.crontab b/infobase/configuration/cron/aa_cron_defaults.crontab index a6ba6849..a33b2fc3 100644 --- a/infobase/configuration/cron/aa_cron_defaults.crontab +++ b/infobase/configuration/cron/aa_cron_defaults.crontab @@ -1,5 +1,5 @@ -#[aa cron defaults] +#[aa_cron_defaults] # # cron default bits to add at top of crontab... # by fred t. hamster, GNU GPL v3 license. diff --git a/infobase/configuration/cron/backup_git_account.crontab b/infobase/configuration/cron/backup_git_account.crontab index ae28d562..fde4348e 100644 --- a/infobase/configuration/cron/backup_git_account.crontab +++ b/infobase/configuration/cron/backup_git_account.crontab @@ -1,7 +1,7 @@ ############## -#[backup git account] +#[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 a8af8d69..2cbde083 100644 --- a/infobase/configuration/cron/backup_maildir.crontab +++ b/infobase/configuration/cron/backup_maildir.crontab @@ -1,7 +1,7 @@ ############## -#[backup maildir] +#[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_mysql_databases.crontab b/infobase/configuration/cron/backup_mysql_databases.crontab index be5ffcf9..c80f91ac 100644 --- a/infobase/configuration/cron/backup_mysql_databases.crontab +++ b/infobase/configuration/cron/backup_mysql_databases.crontab @@ -1,9 +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 +#[backup_all_mysql_databases] +# backs up all of our mysql databases twice a week (as currently configured). +28 4 * * */3 (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 b93e56ff..b295bb0f 100644 --- a/infobase/configuration/cron/backup_photo_albums.crontab +++ b/infobase/configuration/cron/backup_photo_albums.crontab @@ -1,7 +1,7 @@ ############## -#[backup photo albums] +#[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 e6ae20ed..1f04d2cc 100644 --- a/infobase/configuration/cron/backup_serene_system.crontab +++ b/infobase/configuration/cron/backup_serene_system.crontab @@ -1,7 +1,7 @@ ############## -#[backup serene system] +#[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 2d4f5def..dc9bd6a2 100644 --- a/infobase/configuration/cron/backup_trac.crontab +++ b/infobase/configuration/cron/backup_trac.crontab @@ -1,7 +1,7 @@ ############## -#[backup trac] +#[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 9f54bb87..604c5c92 100644 --- a/infobase/configuration/cron/bookmarks_builder.crontab +++ b/infobase/configuration/cron/bookmarks_builder.crontab @@ -1,7 +1,7 @@ ############## -#[bookmarks builder] +#[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/emit_crontab.crontab b/infobase/configuration/cron/emit_crontab.crontab index 99c15e3e..095b9ae4 100644 --- a/infobase/configuration/cron/emit_crontab.crontab +++ b/infobase/configuration/cron/emit_crontab.crontab @@ -1,7 +1,7 @@ ############## -#[emit crontab] +#[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 90df89b5..0848a58c 100644 --- a/infobase/configuration/cron/letsencrypt_renewal.crontab +++ b/infobase/configuration/cron/letsencrypt_renewal.crontab @@ -1,7 +1,7 @@ ############## -#[letsencrypt renewal] +#[letsencrypt_renewal] # run the letsencrypt certificate renewal process every 4 hours. # fixing issues in renewal by setting PATH. PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin diff --git a/infobase/configuration/cron/mailman_attribute_fix.crontab b/infobase/configuration/cron/mailman_attribute_fix.crontab index b0048a66..7532f464 100644 --- a/infobase/configuration/cron/mailman_attribute_fix.crontab +++ b/infobase/configuration/cron/mailman_attribute_fix.crontab @@ -1,7 +1,7 @@ ############## -#[mailman attribute fix] +#[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 c8601f16..9ea138d6 100644 --- a/infobase/configuration/cron/nechung_fortune.crontab +++ b/infobase/configuration/cron/nechung_fortune.crontab @@ -1,7 +1,7 @@ ############## -#[nechung fortune] +#[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. diff --git a/infobase/configuration/cron/opensim_restart.crontab b/infobase/configuration/cron/opensim_restart.crontab index d6f56391..0c53dd73 100644 --- a/infobase/configuration/cron/opensim_restart.crontab +++ b/infobase/configuration/cron/opensim_restart.crontab @@ -1,7 +1,7 @@ ############## -#[opensim restart] +#[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 1913bd24..ac66fa2e 100644 --- a/infobase/configuration/cron/pack_feisty_for_web.crontab +++ b/infobase/configuration/cron/pack_feisty_for_web.crontab @@ -1,7 +1,7 @@ ############## -#[pack feisty for web] +#[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 index a8d15079..27f6d880 100644 --- a/infobase/configuration/cron/periodic_reboot.crontab +++ b/infobase/configuration/cron/periodic_reboot.crontab @@ -1,7 +1,7 @@ ############## -# [periodic reboot] +# [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 3fde27b6..f1ab51d3 100644 --- a/infobase/configuration/cron/process_check.crontab +++ b/infobase/configuration/cron/process_check.crontab @@ -1,7 +1,7 @@ ############## -#[process check] +#[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 a61613b9..5e8df1d6 100644 --- a/infobase/configuration/cron/random_sound.crontab +++ b/infobase/configuration/cron/random_sound.crontab @@ -1,7 +1,7 @@ ############## -#[random sound] +#[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 7b61de29..d9adf167 100644 --- a/infobase/configuration/cron/snarf_linux_configuration.crontab +++ b/infobase/configuration/cron/snarf_linux_configuration.crontab @@ -1,7 +1,7 @@ ############## -#[snarf linux configuration] +#[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 5b43e790..724e85dc 100644 --- a/infobase/configuration/cron/synch_and_swim_downstream.crontab +++ b/infobase/configuration/cron/synch_and_swim_downstream.crontab @@ -1,7 +1,7 @@ ############## -#[synch and swim downstream] +#[synch_and_swim_downstream] # updates local code repositories from main versions before uploading any changes to downstream # repositories, such as sourceforge or github. the uploading process (which we think of as sending # those updated items swimming downstream to their dependent repositories) is done automatically in diff --git a/infobase/configuration/cron/tell_zooty_our_ip.crontab b/infobase/configuration/cron/tell_zooty_our_ip.crontab index 931023a1..9e109057 100644 --- a/infobase/configuration/cron/tell_zooty_our_ip.crontab +++ b/infobase/configuration/cron/tell_zooty_our_ip.crontab @@ -1,7 +1,7 @@ ############## -#[tell zooty our ip] +#[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 4d58fc58..6b064f5c 100644 --- a/infobase/configuration/cron/time_synch.crontab +++ b/infobase/configuration/cron/time_synch.crontab @@ -1,20 +1,32 @@ ############## -#[time synch] +#[time_synch_suite] LOCAL_TIME_SERVER=greendragon ############## -# note: uncomment one of the below (client or server). +# note: uncomment only one of the below (local client, local server, or remote client). +############## + +#[update_system_time_local_client] # 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 +############## + +#[update_system_time_local_server] # 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 ############## +#[update_system_time_remote_client] +# synchronize the time with a real ntp server. +#42 0,4,8,12,16,20 * * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; bash $FEISTY_MEOW_APEX/scripts/system/update_system_time.sh ) &>/tmp/${CRONUSER}-cron-update_system_time.log + +############## + diff --git a/infobase/configuration/cron/update_apt_based_linux.crontab b/infobase/configuration/cron/update_apt_based_linux.crontab index 2e2ae02e..b9dea269 100644 --- a/infobase/configuration/cron/update_apt_based_linux.crontab +++ b/infobase/configuration/cron/update_apt_based_linux.crontab @@ -1,7 +1,7 @@ ############## -#[update apt based linux crontab] +#[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 3605e648..2d92c892 100644 --- a/infobase/configuration/cron/uptime_report.crontab +++ b/infobase/configuration/cron/uptime_report.crontab @@ -1,7 +1,7 @@ ############## -#[uptime report] +#[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 c3453d2f..643af13a 100644 --- a/infobase/configuration/cron/web_group_perm_fix.crontab +++ b/infobase/configuration/cron/web_group_perm_fix.crontab @@ -1,7 +1,7 @@ ############## -#[web group perm fix] +#[web_group_perm_fix] # fix the web directories for group access. 0 * * * * chmod -R g+w /var/www &>/dev/null -- 2.34.1