diff options
| author | Lukasz Kasprzak <lukasz.kasprzak@pm.me> | 2026-04-14 22:32:43 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukasz.kasprzak@pm.me> | 2026-04-14 22:32:43 +0200 |
| commit | 83f7fe4b8402bab171d110703a1b1115efbc9b28 (patch) | |
| tree | 19110702c7d740f6bd8ee4f5d2ebcb97442be237 /straper/db/public/cron | |
| parent | 51d43498b07dc97d795947964534f0903cd05db5 (diff) | |
| download | bin-83f7fe4b8402bab171d110703a1b1115efbc9b28.tar.gz bin-83f7fe4b8402bab171d110703a1b1115efbc9b28.zip | |
cleaned up many scrits and deleted some that were of no use; renamed a lot
Diffstat (limited to 'straper/db/public/cron')
24 files changed, 0 insertions, 345 deletions
diff --git a/straper/db/public/cron/cron.d/.placeholder b/straper/db/public/cron/cron.d/.placeholder deleted file mode 100644 index 76cb8d0..0000000 --- a/straper/db/public/cron/cron.d/.placeholder +++ /dev/null @@ -1,2 +0,0 @@ -# DO NOT EDIT OR REMOVE -# This file is a simple placeholder to keep dpkg from removing this directory diff --git a/straper/db/public/cron/cron.d/anacron b/straper/db/public/cron/cron.d/anacron deleted file mode 100644 index 57b33c5..0000000 --- a/straper/db/public/cron/cron.d/anacron +++ /dev/null @@ -1,6 +0,0 @@ -# /etc/cron.d/anacron: crontab entries for the anacron package - -SHELL=/bin/sh -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin - -30 7-23 * * * root if [ -x /etc/init.d/anacron ] && ! [ -d /run/systemd/system ]; then exec /usr/sbin/invoke-rc.d anacron start >/dev/null; fi diff --git a/straper/db/public/cron/cron.d/certbot b/straper/db/public/cron/cron.d/certbot deleted file mode 100644 index cac009f..0000000 --- a/straper/db/public/cron/cron.d/certbot +++ /dev/null @@ -1,17 +0,0 @@ -# /etc/cron.d/certbot: crontab entries for the certbot package -# -# Upstream recommends attempting renewal twice a day -# -# Eventually, this will be an opportunity to validate certificates -# haven't been revoked, etc. Renewal will only occur if expiration -# is within 30 days. -# -# Important Note! This cronjob will NOT be executed if you are -# running systemd as your init system. If you are running systemd, -# the cronjob.timer function takes precedence over this cronjob. For -# more details, see the systemd.timer manpage, or use systemctl show -# certbot.timer. -SHELL=/bin/sh -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin - -0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(43200))' && certbot -q renew --no-random-sleep-on-renew diff --git a/straper/db/public/cron/cron.d/e2scrub_all b/straper/db/public/cron/cron.d/e2scrub_all deleted file mode 100644 index 7af25f1..0000000 --- a/straper/db/public/cron/cron.d/e2scrub_all +++ /dev/null @@ -1,2 +0,0 @@ -30 3 * * 0 root test -e /run/systemd/system || SERVICE_MODE=1 /usr/libexec/e2fsprogs/e2scrub_all_cron -10 3 * * * root test -e /run/systemd/system || SERVICE_MODE=1 /sbin/e2scrub_all -A -r diff --git a/straper/db/public/cron/cron.d/zfs-auto-snapshot b/straper/db/public/cron/cron.d/zfs-auto-snapshot deleted file mode 100644 index 613afc9..0000000 --- a/straper/db/public/cron/cron.d/zfs-auto-snapshot +++ /dev/null @@ -1,3 +0,0 @@ -PATH="/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin" - -*/15 * * * * root which zfs-auto-snapshot > /dev/null || exit 0 ; zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 // diff --git a/straper/db/public/cron/cron.d/zfsutils-linux b/straper/db/public/cron/cron.d/zfsutils-linux deleted file mode 100644 index 4c0d373..0000000 --- a/straper/db/public/cron/cron.d/zfsutils-linux +++ /dev/null @@ -1,7 +0,0 @@ -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin - -# TRIM the first Sunday of every month. -24 0 1-7 * * root if [ $(date +\%w) -eq 0 ] && [ -x /usr/lib/zfs-linux/trim ]; then /usr/lib/zfs-linux/trim; fi - -# Scrub the second Sunday of every month. -24 0 8-14 * * root if [ $(date +\%w) -eq 0 ] && [ -x /usr/lib/zfs-linux/scrub ]; then /usr/lib/zfs-linux/scrub; fi diff --git a/straper/db/public/cron/cron.daily/.placeholder b/straper/db/public/cron/cron.daily/.placeholder deleted file mode 100644 index 76cb8d0..0000000 --- a/straper/db/public/cron/cron.daily/.placeholder +++ /dev/null @@ -1,2 +0,0 @@ -# DO NOT EDIT OR REMOVE -# This file is a simple placeholder to keep dpkg from removing this directory diff --git a/straper/db/public/cron/cron.daily/0anacron b/straper/db/public/cron/cron.daily/0anacron deleted file mode 100755 index 262530a..0000000 --- a/straper/db/public/cron/cron.daily/0anacron +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# -# anacron's cron script -# -# This script updates anacron time stamps. It is called through run-parts -# either by anacron itself or by cron. -# -# The script is called "0anacron" to assure that it will be executed -# _before_ all other scripts. - -test -x /usr/sbin/anacron || exit 0 -anacron -u cron.daily diff --git a/straper/db/public/cron/cron.daily/apt-compat b/straper/db/public/cron/cron.daily/apt-compat deleted file mode 100755 index bde3237..0000000 --- a/straper/db/public/cron/cron.daily/apt-compat +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh - -set -e - -# Systemd systems use a systemd timer unit which is preferable to -# run. We want to randomize the apt update and unattended-upgrade -# runs as much as possible to avoid hitting the mirrors all at the -# same time. The systemd time is better at this than the fixed -# cron.daily time -if [ -d /run/systemd/system ]; then - exit 0 -fi - -check_power() -{ - # laptop check, on_ac_power returns: - # 0 (true) System is on main power - # 1 (false) System is not on main power - # 255 (false) Power status could not be determined - # Desktop systems always return 255 it seems - if command -v on_ac_power >/dev/null; then - if on_ac_power; then - : - elif [ $? -eq 1 ]; then - return 1 - fi - fi - return 0 -} - -# sleep for a random interval of time (default 30min) -# (some code taken from cron-apt, thanks) -random_sleep() -{ - RandomSleep=1800 - eval $(apt-config shell RandomSleep APT::Periodic::RandomSleep) - if [ $RandomSleep -eq 0 ]; then - return - fi - if [ -z "$RANDOM" ] ; then - # A fix for shells that do not have this bash feature. - RANDOM=$(( $(dd if=/dev/urandom bs=2 count=1 2> /dev/null | cksum | cut -d' ' -f1) % 32767 )) - fi - TIME=$(($RANDOM % $RandomSleep)) - sleep $TIME -} - -# delay the job execution by a random amount of time -random_sleep - -# ensure we don't do this on battery -check_power || exit 0 - -# run daily job -exec /usr/lib/apt/apt.systemd.daily diff --git a/straper/db/public/cron/cron.daily/disk-alert b/straper/db/public/cron/cron.daily/disk-alert deleted file mode 100755 index ea987a3..0000000 --- a/straper/db/public/cron/cron.daily/disk-alert +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -df -hP | awk '$5+0 >= 90 {print}' | \ -mail -s "Disk usage warning on $(hostname)" root - diff --git a/straper/db/public/cron/cron.daily/dpkg b/straper/db/public/cron/cron.daily/dpkg deleted file mode 100755 index 899572d..0000000 --- a/straper/db/public/cron/cron.daily/dpkg +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -# Skip if systemd is running. -if [ -d /run/systemd/system ]; then - exit 0 -fi - -/usr/libexec/dpkg/dpkg-db-backup diff --git a/straper/db/public/cron/cron.daily/logrotate b/straper/db/public/cron/cron.daily/logrotate deleted file mode 100755 index 1ac1570..0000000 --- a/straper/db/public/cron/cron.daily/logrotate +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -# skip in favour of systemd timer -if [ -d /run/systemd/system ]; then - exit 0 -fi - -# this cronjob persists removals (but not purges) -if [ ! -x /usr/sbin/logrotate ]; then - exit 0 -fi - -/usr/sbin/logrotate /etc/logrotate.conf -EXITVALUE=$? -if [ $EXITVALUE != 0 ]; then - /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]" -fi -exit $EXITVALUE diff --git a/straper/db/public/cron/cron.daily/man-db b/straper/db/public/cron/cron.daily/man-db deleted file mode 100755 index 4dd8ae0..0000000 --- a/straper/db/public/cron/cron.daily/man-db +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -# -# man-db cron daily - -set -e - -if [ -d /run/systemd/system ]; then - # Skip in favour of systemd timer. - exit 0 -fi - -# This should be set by cron, but apparently isn't always; see -# https://bugs.debian.org/209185. Add fallbacks so that start-stop-daemon -# can be found. -export PATH="$PATH:/usr/local/sbin:/usr/sbin:/sbin" - -iosched_idle= -# Don't try to change I/O priority in a vserver or OpenVZ. -if ! grep -Eq '(envID|VxID):.*[1-9]' /proc/self/status && \ - { [ ! -d /proc/vz ] || [ -d /proc/bc ]; }; then - iosched_idle='--iosched idle' -fi - -if ! [ -d /var/cache/man ]; then - # Recover from deletion, per FHS. - install -d -o man -g man -m 0755 /var/cache/man -fi - -# expunge old catman pages which have not been read in a week -if [ -d /var/cache/man ]; then - cd / - # shellcheck disable=SC2086 - start-stop-daemon --start --pidfile /dev/null --startas /bin/sh \ - --oknodo --chuid man $iosched_idle -- -c \ - "find /var/cache/man -type f -name '*.gz' -atime +6 -print0 | \ - xargs -r0 rm -f" -fi - -# regenerate man database -if [ -x /usr/bin/mandb ]; then - # --pidfile /dev/null so it always starts; mandb isn't really a daemon, - # but we want to start it like one. - # shellcheck disable=SC2086 - start-stop-daemon --start --pidfile /dev/null \ - --startas /usr/bin/mandb --oknodo --chuid man \ - $iosched_idle \ - -- --no-purge --quiet -fi - -exit 0 diff --git a/straper/db/public/cron/cron.daily/plocate b/straper/db/public/cron/cron.daily/plocate deleted file mode 100755 index e3b6c42..0000000 --- a/straper/db/public/cron/cron.daily/plocate +++ /dev/null @@ -1,35 +0,0 @@ -#! /bin/sh - -set -e - -UPDATEDB=/usr/sbin/updatedb.plocate - -# Skip if systemd timer is available. -if [ -d /run/systemd/system ]; then - exit 0 -fi - -[ -x $UPDATEDB ] || exit 0 - -if which on_ac_power >/dev/null 2>&1; then - ON_BATTERY=0 - on_ac_power >/dev/null 2>&1 || ON_BATTERY=$? - if [ "$ON_BATTERY" -eq 1 ]; then - exit 0 - fi -fi - -# See ionice(1). -IONICE= -if [ -x /usr/bin/ionice ] && - /usr/bin/ionice -c3 true 2>/dev/null; then - IONICE="/usr/bin/ionice -c3" -fi - -# See nocache(1). -NOCACHE= -if [ -x /usr/bin/nocache ]; then - NOCACHE="/usr/bin/nocache" -fi - -flock --nonblock /run/plocate.daily.lock $NOCACHE $IONICE nice $UPDATEDB diff --git a/straper/db/public/cron/cron.daily/zfs-auto-snapshot b/straper/db/public/cron/cron.daily/zfs-auto-snapshot deleted file mode 100755 index 14fe006..0000000 --- a/straper/db/public/cron/cron.daily/zfs-auto-snapshot +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -# Only call zfs-auto-snapshot if it's available -which zfs-auto-snapshot > /dev/null || exit 0 - -exec zfs-auto-snapshot --quiet --syslog --label=daily --keep=31 // diff --git a/straper/db/public/cron/cron.monthly/.placeholder b/straper/db/public/cron/cron.monthly/.placeholder deleted file mode 100644 index 76cb8d0..0000000 --- a/straper/db/public/cron/cron.monthly/.placeholder +++ /dev/null @@ -1,2 +0,0 @@ -# DO NOT EDIT OR REMOVE -# This file is a simple placeholder to keep dpkg from removing this directory diff --git a/straper/db/public/cron/cron.monthly/0anacron b/straper/db/public/cron/cron.monthly/0anacron deleted file mode 100755 index 1b094c0..0000000 --- a/straper/db/public/cron/cron.monthly/0anacron +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# -# anacron's cron script -# -# This script updates anacron time stamps. It is called through run-parts -# either by anacron itself or by cron. -# -# The script is called "0anacron" to assure that it will be executed -# _before_ all other scripts. - -test -x /usr/sbin/anacron || exit 0 -anacron -u cron.monthly diff --git a/straper/db/public/cron/cron.monthly/zfs-auto-snapshot b/straper/db/public/cron/cron.monthly/zfs-auto-snapshot deleted file mode 100755 index 2ab823f..0000000 --- a/straper/db/public/cron/cron.monthly/zfs-auto-snapshot +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -# Only call zfs-auto-snapshot if it's available -which zfs-auto-snapshot > /dev/null || exit 0 - -exec zfs-auto-snapshot --quiet --syslog --label=monthly --keep=12 // diff --git a/straper/db/public/cron/cron.weekly/.placeholder b/straper/db/public/cron/cron.weekly/.placeholder deleted file mode 100644 index 76cb8d0..0000000 --- a/straper/db/public/cron/cron.weekly/.placeholder +++ /dev/null @@ -1,2 +0,0 @@ -# DO NOT EDIT OR REMOVE -# This file is a simple placeholder to keep dpkg from removing this directory diff --git a/straper/db/public/cron/cron.weekly/0anacron b/straper/db/public/cron/cron.weekly/0anacron deleted file mode 100755 index d53cde3..0000000 --- a/straper/db/public/cron/cron.weekly/0anacron +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# -# anacron's cron script -# -# This script updates anacron time stamps. It is called through run-parts -# either by anacron itself or by cron. -# -# The script is called "0anacron" to assure that it will be executed -# _before_ all other scripts. - -test -x /usr/sbin/anacron || exit 0 -anacron -u cron.weekly diff --git a/straper/db/public/cron/cron.weekly/man-db b/straper/db/public/cron/cron.weekly/man-db deleted file mode 100755 index c2a55cb..0000000 --- a/straper/db/public/cron/cron.weekly/man-db +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# -# man-db cron weekly - -set -e - -if [ -d /run/systemd/system ]; then - # Skip in favour of systemd timer. - exit 0 -fi - -# This should be set by cron, but apparently isn't always; see -# https://bugs.debian.org/209185. Add fallbacks so that start-stop-daemon -# can be found. -export PATH="$PATH:/usr/local/sbin:/usr/sbin:/sbin" - -iosched_idle= -# Don't try to change I/O priority in a vserver or OpenVZ. -if ! grep -Eq '(envID|VxID):.*[1-9]' /proc/self/status && \ - { [ ! -d /proc/vz ] || [ -d /proc/bc ]; }; then - iosched_idle='--iosched idle' -fi - -if ! [ -d /var/cache/man ]; then - # Recover from deletion, per FHS. - install -d -o man -g man -m 0755 /var/cache/man -fi - -# regenerate man database -if [ -x /usr/bin/mandb ]; then - # --pidfile /dev/null so it always starts; mandb isn't really a daemon, - # but we want to start it like one. - # shellcheck disable=SC2086 - start-stop-daemon --start --pidfile /dev/null \ - --startas /usr/bin/mandb --oknodo --chuid man \ - $iosched_idle \ - -- --quiet -fi - -exit 0 diff --git a/straper/db/public/cron/cron.weekly/tor b/straper/db/public/cron/cron.weekly/tor deleted file mode 100755 index c30381b..0000000 --- a/straper/db/public/cron/cron.weekly/tor +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -set -e -set -u - -DEFAULTSFILE=/etc/default/tor - -if [ -f $DEFAULTSFILE ] ; then - . $DEFAULTSFILE -fi - -if [ "${CLEANUP_OLD_COREFILES:-}" = "y" ] ; then - if [ -d /var/lib/tor ] ; then - find /var/lib/tor -mindepth 1 -maxdepth 1 -type f -mtime +21 -user debian-tor -regex '.*/core\(\.[0-9]+\)?' -exec rm '{}' + - fi -fi diff --git a/straper/db/public/cron/cron.weekly/zfs-auto-snapshot b/straper/db/public/cron/cron.weekly/zfs-auto-snapshot deleted file mode 100755 index 3aa977a..0000000 --- a/straper/db/public/cron/cron.weekly/zfs-auto-snapshot +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -# Only call zfs-auto-snapshot if it's available -which zfs-auto-snapshot > /dev/null || exit 0 - -exec zfs-auto-snapshot --quiet --syslog --label=weekly --keep=8 // diff --git a/straper/db/public/cron/crontab b/straper/db/public/cron/crontab deleted file mode 100644 index 2551a00..0000000 --- a/straper/db/public/cron/crontab +++ /dev/null @@ -1,22 +0,0 @@ -# /etc/crontab: system-wide crontab -# Unlike any other crontab you don't have to run the `crontab' -# command to install the new version when you edit this file -# and files in /etc/cron.d. These files also have username fields, -# that none of the other crontabs do. - -SHELL=/bin/sh -PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin - -# Example of job definition: -# .---------------- minute (0 - 59) -# | .------------- hour (0 - 23) -# | | .---------- day of month (1 - 31) -# | | | .------- month (1 - 12) OR jan,feb,mar,apr ... -# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat -# | | | | | -# * * * * * user-name command to be executed -17 * * * * root cd / && run-parts --report /etc/cron.hourly -25 6 * * * root test -x /usr/sbin/anacron || { cd / && run-parts --report /etc/cron.daily; } -47 6 * * 7 root test -x /usr/sbin/anacron || { cd / && run-parts --report /etc/cron.weekly; } -52 6 1 * * root test -x /usr/sbin/anacron || { cd / && run-parts --report /etc/cron.monthly; } -# |
