File manager - Edit - /home/c14075/dragmet-ural.ru/www/cron.daily.tar
Back
apt-compat 0000755 00000002706 15103460162 0006542 0 ustar 00 #!/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 which on_ac_power >/dev/null 2>&1; 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 logrotate 0000755 00000000571 15103460162 0006473 0 ustar 00 #!/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 .placeholder 0000644 00000000146 15103460162 0007026 0 ustar 00 # DO NOT EDIT OR REMOVE # This file is a simple placeholder to keep dpkg from removing this directory man-db 0000755 00000002143 15103460162 0005626 0 ustar 00 #!/bin/sh # # man-db cron daily set -e if [ -d /run/systemd/system ]; then # Skip in favour of systemd timer. exit 0 fi iosched_idle= # Don't try to change I/O priority in a vserver or OpenVZ. if ! egrep -q '(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 / 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. start-stop-daemon --start --pidfile /dev/null \ --startas /usr/bin/mandb --oknodo --chuid man \ $iosched_idle \ -- --no-purge --quiet fi exit 0 dpkg 0000755 00000002422 15103460162 0005415 0 ustar 00 #!/bin/sh dbdir=/var/lib/dpkg # Backup the 7 last versions of dpkg databases containing user data. if cd /var/backups ; then # We backup all relevant database files if any has changed, so that # the rotation number always contains an internally consistent set. dbchanged=no dbfiles="arch status diversions statoverride" for db in $dbfiles ; do if ! [ -s "dpkg.${db}.0" ] && ! [ -s "$dbdir/$db" ]; then # Special case the files not existing or being empty as being equal. continue elif ! cmp -s "dpkg.${db}.0" "$dbdir/$db"; then dbchanged=yes break fi done if [ "$dbchanged" = "yes" ] ; then for db in $dbfiles ; do if [ -e "$dbdir/$db" ]; then cp -p "$dbdir/$db" "dpkg.$db" else touch "dpkg.$db" fi savelog -c 7 "dpkg.$db" >/dev/null done fi # The alternatives database is independent from the dpkg database. dbalt=alternatives # XXX: Ideally we'd use --warning=none instead of discarding stderr, but # as of GNU tar 1.27.1, it does not seem to work reliably (see #749307). if ! test -e ${dbalt}.tar.0 || ! tar -df ${dbalt}.tar.0 -C $dbdir $dbalt >/dev/null 2>&1 ; then tar -cf ${dbalt}.tar -C $dbdir $dbalt >/dev/null 2>&1 savelog -c 7 ${dbalt}.tar >/dev/null fi fi apache2 0000755 00000001033 15103460162 0005770 0 ustar 00 #!/bin/sh # run htcacheclean if set to 'cron' mode set -e set -u type htcacheclean > /dev/null 2>&1 || exit 0 [ -e /etc/default/apache-htcacheclean ] || exit 0 # edit /etc/default/apache-htcacheclean to change this HTCACHECLEAN_MODE=daemon HTCACHECLEAN_RUN=auto HTCACHECLEAN_SIZE=300M HTCACHECLEAN_PATH=/var/cache/apache2/mod_cache_disk HTCACHECLEAN_OPTIONS="" . /etc/default/apache-htcacheclean [ "$HTCACHECLEAN_MODE" = "cron" ] || exit 0 htcacheclean ${HTCACHECLEAN_OPTIONS} \ -p${HTCACHECLEAN_PATH} \ -l${HTCACHECLEAN_SIZE} phoenix-ga-updater 0000755 00000003463 15103460162 0010177 0 ustar 00 #!/bin/bash set -eu declare -r H="$(hostname -s)" declare -r URL="http://updates.netangels.ru/phoenix-ga" declare -r USER_AGENT="GuestAgent_Updater_v0.5" declare -r WGET_BINARY="/usr/bin/wget" declare -r WGET_CMD="$WGET_BINARY -q --tries=3 --user-agent=${USER_AGENT}" declare -r CURL_BINARY="/usr/bin/curl" declare -r CURL_CMD="$CURL_BINARY -sf -L --retry 3 --user-agent ${USER_AGENT}" declare -r TEMPDIR="$(mktemp -d --tmpdir=/tmp pga_XXXXX)" trap "rm -Rf $TEMPDIR" 0 declare -r GA_BINARY="/usr/sbin/phoenix-ga" declare -r GA_TMPFILE="${TEMPDIR}/phoenix-ga" # Redirecting stdout/stderr to the remote syslog server exec 2>/dev/null exec > >(sed -u "s/^/<14>${H} ${USER_AGENT}: /g" >/dev/udp/logger.netangels.ru/1514 || exec >/dev/null) exec 2>&1 fetch() { local -r TARGET="$1" local -r OUTFILE="$2" if [[ -x "${WGET_BINARY}" ]] then $WGET_CMD -O "$OUTFILE" "${URL}/${TARGET}" || return 2 return 0 fi if [[ -x "${CURL_BINARY}" ]] then $CURL_CMD -o "$OUTFILE" "${URL}/${TARGET}" || return 2 return 0 fi echo "Not found: $WGET_BINARY or $CURL_BINARY" >&2 return 1 } # In order to spread requests to the server more equally if [[ "${1:-}" != 'now' ]] ; then sleep $[$RANDOM%300] fi declare -r CURRENT_HASH="$(md5sum $GA_BINARY | awk '{print $1}')" declare -r NEW_HASH="$(fetch agent.md5sum -)" if [[ "$NEW_HASH" == "$CURRENT_HASH" ]] ; then # Update is not necessary exit 0 fi fetch "agent" "$GA_TMPFILE" || { echo "Cannot fetch: ${URL}/agent" >&2 exit 1 } # Checking if GA_TMPFILE is a binary file if [[ "$(dd if=${GA_TMPFILE} bs=1 count=4 | base64)" != "f0VMRg==" ]] ; then echo "Not a binary file: $GA_TMPFILE" exit 1 fi # Updating chmod 750 "$GA_TMPFILE" mv -f "$GA_TMPFILE" "$GA_BINARY" pkill -f "$GA_BINARY" || true exit 0 mlocate 0000755 00000001164 15103460162 0006116 0 ustar 00 #! /bin/bash set -e # skip in favour of systemd timer if [ -d /run/systemd/system ]; then exit 0 fi [ -x /usr/bin/updatedb.mlocate ] || 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) 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/mlocate.daily.lock $NOCACHE $IONICE nice /usr/bin/updatedb.mlocate
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.29 |
proxy
|
phpinfo
|
Settings