Skip to content

Commit d9ad945

Browse files
committed
daily
1 parent 94cc2f2 commit d9ad945

File tree

6 files changed

+66
-16
lines changed

6 files changed

+66
-16
lines changed

debian-setup/deb-legacy-hunter.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
3+
exit 0
4+
5+
#aptitude search --disable-columns --display-format "%p" <TERMS>
6+
7+
# 100% sure to remove
8+
apt autoremove --purge
9+
10+
# Not from stable
11+
aptitude search '?and(?installed, ?not(?archive(stable)))'
12+
13+
# Not native architecture
14+
aptitude search '?and(?installed, ?not(?architecture(native)))'
15+
16+
# Packages on hold
17+
aptitude search '?and(?installed, ?action(hold))'
18+
19+
# Only configuration files left
20+
aptitude search '?config-files'
21+
22+
# Transitional packages
23+
aptitude search '?and(?installed, ?description(transitional))'
24+
25+
# Various legacy
26+
aptitude search '?and(?installed, ?or(?garbage, ?broken, ?obsolete))'
27+
28+
# /etc - Broken symlinks
29+
find /etc -xtype l -print0 | xargs -0 -- ls -l
30+
# /etc - Ignored by etckeeper
31+
git -C /etc status --short --ignored
32+
# /etc - Legacy
33+
find /etc -path "*.ucf-dist" -o -path "*.dpkg-old" -o -path "*.dpkg-dist" -o -path "*~"

debian-setup/debian-setup2.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ Pkg_install_quiet \
4646
localepurge unattended-upgrades apt-listchanges debsums \
4747
ncurses-term mc most less time moreutils unzip \
4848
logtail apg bc dos2unix ccze colordiff sipcalc iprange jq \
49-
net-tools dnsutils ntpdate ipset netcat-openbsd lftp s-nail \
50-
gcc g++ libc6-dev make strace \
51-
unscd cruft bash-completion htop mmdb-bin geoipupdate \
49+
net-tools dnsutils ntpsec-ntpdate ipset netcat-openbsd \
50+
lftp s-nail gcc g++ libc6-dev make strace \
51+
unscd cruft-ng bash-completion htop mmdb-bin geoipupdate \
5252
init-system-helpers needrestart git mtr-tiny whois openssl
5353

5454
# Provide mail command

debian-setup/packages/chrony

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,20 @@ fi
1212
cat >/etc/chrony/chrony.conf <<EOF
1313
# Welcome to the chrony configuration file. See chrony.conf(5) for more
1414
# information about usable directives.
15+
16+
# Include configuration files found in /etc/chrony/conf.d.
17+
confdir /etc/chrony/conf.d
18+
19+
# Use Debian vendor zone.
1520
pool ${CHRONY_POOL} iburst
1621
pool 2.debian.pool.ntp.org iburst
1722
23+
# Use time sources from DHCP.
24+
sourcedir /run/chrony-dhcp
25+
26+
# Use NTP sources found in /etc/chrony/sources.d.
27+
sourcedir /etc/chrony/sources.d
28+
1829
# This directive specify the location of the file containing ID/key pairs for
1930
# NTP authentication.
2031
keyfile /etc/chrony/chrony.keys
@@ -26,7 +37,11 @@ cmdport 0
2637
# information.
2738
driftfile /var/lib/chrony/chrony.drift
2839
40+
# Save NTS keys and cookies.
41+
ntsdumpdir /var/lib/chrony
42+
2943
# Uncomment the following line to turn logging on.
44+
#log tracking measurements statistics
3045
log statistics
3146
3247
# Log files location.
@@ -35,20 +50,21 @@ logdir /var/log/chrony
3550
# Log 10 msec offset changes.
3651
logchange 0.010
3752
38-
## seccomp (-F -1) is not compatible with mailonchange
39-
#mailonchange root 0.500
40-
4153
# Stop bad estimates upsetting machine clock.
4254
maxupdateskew 100.0
4355
4456
# This directive enables kernel synchronisation (every 11 minutes) of the
45-
# real-time clock. Note that it can’t be used along with the 'rtcfile' directive.
46-
# Virtual servers do not have permanent RTCs.
57+
# real-time clock. Note that it can't be used along with the 'rtcfile' directive.
4758
#rtcsync
4859
4960
# Step the system clock instead of slewing it if the adjustment is larger than
5061
# one second, but only in the first three clock updates.
5162
makestep 1 3
63+
64+
# Get TAI-UTC offset and leap seconds from the system tz database.
65+
# This directive must be commented out when using time sources serving
66+
# leap-smeared time.
67+
leapsectz right/UTC
5268
EOF
5369

5470
service chrony restart

debian-setup/packages/systemd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if [ "$WITHOUT_SYSTEMD" == "yes" ]; then
66
# Remove systemd
77
# http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation
88
if Is_installed systemd; then
9-
Pkg_install_quiet sysvinit-core sysvinit-utils bootlogd rsyslog
9+
Pkg_install_quiet sysvinit-core sysvinit-utils orphan-sysvinit-scripts bootlogd rsyslog
1010
cp /usr/share/sysvinit/inittab /etc/inittab
1111
# Change to agetty
1212
#sed -i -e 's|:/sbin/getty |:/sbin/agetty |' /etc/inittab

monitoring/monit/services/ntpdate_script

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ set -e
2525
export NTPSERVERS="${*:-0.europe.pool.ntp.org}"
2626
declare -i OFFSET_MSEC
2727

28-
OFFSET="$(/usr/sbin/ntpdate-debian -q \
29-
| sed -n -e '0,/^.*) [+-]\([0-9.]\+\) +\/- [0-9.]\+ .*$/ s//\1/p')"
28+
OFFSET="$(
29+
/usr/sbin/ntpdate-debian -q | sed -n -e '0,/^.*) [+-]\([0-9.]\+\) +\/- [0-9.]\+ .*$/ s//\1/p'
30+
)"
3031

3132
if [ -z "$OFFSET" ]; then
3233
Error 1 "Failed to measure offset"

monitoring/ntpdated

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
#
33
# Run ntpdate daily and on reboot to correct the system clock.
44
#
5-
# VERSION :0.6.1
6-
# DATE :2016-03-06
5+
# VERSION :0.7.1
6+
# DATE :2025-09-19
77
# AUTHOR :Viktor Szépe <[email protected]>
88
# LICENSE :The MIT License (MIT)
99
# URL :https://github.com/szepeviktor/debian-server-tools
1010
# BASH-VERSION :4.2+
1111
# DEPENDS :apt-get install ntpdate bind9-host
12-
# CONFIG :/etc/default/ntpdate
12+
# CONFIG :/etc/default/ntpsec-ntpdate
1313
# LOCATION :/usr/local/sbin/ntpdated
1414
# CRON.D :@reboot root /usr/local/sbin/ntpdated
1515
# CRON.D :@hourly root /usr/local/sbin/ntpdated
@@ -44,9 +44,9 @@ Get_pool_ips()
4444

4545
set -e
4646

47-
if [ -r /etc/default/ntpdate ]; then
47+
if [ -r /etc/default/ntpsec-ntpdate ]; then
4848
# shellcheck disable=SC1091
49-
source /etc/default/ntpdate
49+
source /etc/default/ntpsec-ntpdate
5050
fi
5151

5252
# shellcheck disable=SC2086,SC2046

0 commit comments

Comments
 (0)