iankelling.org
/
git
/
distro-setup
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7f9af41
)
update bitcoin, new host related fixes
author
Ian Kelling
<ian@iankelling.org>
Wed, 24 Apr 2024 19:22:48 +0000
(15:22 -0400)
committer
Ian Kelling
<ian@iankelling.org>
Wed, 24 Apr 2024 19:22:48 +0000
(15:22 -0400)
brc2
patch
|
blob
|
history
distro-begin
patch
|
blob
|
history
distro-end
patch
|
blob
|
history
filesystem/etc/systemd/system/bitcoind.service
patch
|
blob
|
history
filesystem/usr/local/bin/bitcoinon
patch
|
blob
|
history
machine_specific/btrbk.hosts
patch
|
blob
|
history
machine_specific/s76.hosts
patch
|
blob
|
history
mail-setup
patch
|
blob
|
history
switch-mail-host
patch
|
blob
|
history
diff --git
a/brc2
b/brc2
index e936badfba828a52dcbab2c003e8b1c05bd2c65a..45249e6a8f533e812f6a15d394058503c14ad793 100644
(file)
--- a/
brc2
+++ b/
brc2
@@
-2749,7
+2749,13
@@
EOF
echo "EOF"
} | u /p/c/dnsmasq-data
echo "EOF"
} | u /p/c/dnsmasq-data
+ b8_ip=$(dig +short b8.nz @iankelling.org | tail -1)
+ if [[ ! $b8_ip ]]; then
+ echo "$0: error: got empty b8.nz ip. returning 1"
+ return 1
+ fi
{
{
+ echo "@ A $b8_ip"
for host in ${!nonvpn_ips[@]}; do
ipsuf=${nonvpn_ips[$host]}
echo "$host A 10.2.0.$ipsuf"
for host in ${!nonvpn_ips[@]}; do
ipsuf=${nonvpn_ips[$host]}
echo "$host A 10.2.0.$ipsuf"
@@
-2768,12
+2774,12
@@
EOF
echo checking for stray files:
echo checking for stray files:
- initial_dir=
$PWD
+ initial_dir=
"$PWD"
cd /a/bin/ds/machine_specific
ngset
files=( */filesystem/etc/systemd/system/openvpn-client-tr@.service )
ngreset
cd /a/bin/ds/machine_specific
ngset
files=( */filesystem/etc/systemd/system/openvpn-client-tr@.service )
ngreset
- cd
$initial_dir
+ cd
"$initial_dir"
for f in "${files[@]}"; do
host=${f%%/*}
if [[ ! ${vpn_ips[$host]} ]]; then
for f in "${files[@]}"; do
host=${f%%/*}
if [[ ! ${vpn_ips[$host]} ]]; then
diff --git
a/distro-begin
b/distro-begin
index 5752961798f24d169088faac22ea0e5288021646..e97c6c37bf46264d02483bf4e81abd0d816a0a1a 100755
(executable)
--- a/
distro-begin
+++ b/
distro-begin
@@
-25,6
+25,8
@@
# /a/bin/ds/filesystem/etc/prometheus/rules/iank.yml
#
# Update hostnames in /b/ds/check-remote-mailqs
# /a/bin/ds/filesystem/etc/prometheus/rules/iank.yml
#
# Update hostnames in /b/ds/check-remote-mailqs
+# Update hostnames in /b/ds/machine_specific/*.hosts /p/c/machine_specific/*.hosts
+# Update hostnames in this file
### end new machine setup
### end new machine setup
@@
-111,7
+113,7
@@
source $script_dir/pkgs
set +x
source /a/bin/distro-functions/src/identify-distros
$interactive || set -x
set +x
source /a/bin/distro-functions/src/identify-distros
$interactive || set -x
-for f in kd x2 x3 x8 frodo tp li bk je demohost kw sy bo; do
+for f in kd x2 x3 x8 frodo tp li bk je demohost kw sy bo
so
; do
eval "$f() { [[ $HOSTNAME == $f ]]; }"
done
codename=$(debian-codename)
eval "$f() { [[ $HOSTNAME == $f ]]; }"
done
codename=$(debian-codename)
diff --git
a/distro-end
b/distro-end
index 19cdaba738bda94a9c6b02808c0d25b80094057c..066264b86efbb175aaacddd25185256d48306832 100755
(executable)
--- a/
distro-end
+++ b/
distro-end
@@
-1946,8
+1946,8
@@
esac
### begin bitcoin ###
case $HOSTNAME in
### begin bitcoin ###
case $HOSTNAME in
- sy|kd)
- sudo install -m 0755 -o root -g root -t /usr/bin /a/opt/bitcoin-2
6
.0/bin/*
+ sy|kd
|so
)
+ sudo install -m 0755 -o root -g root -t /usr/bin /a/opt/bitcoin-2
7
.0/bin/*
# Note: i leave it to system-status to start and stop bitcoin.
# note: the bitcoin user & group are setup in fai
sudo usermod -a -G bitcoin iank
# Note: i leave it to system-status to start and stop bitcoin.
# note: the bitcoin user & group are setup in fai
sudo usermod -a -G bitcoin iank
diff --git
a/filesystem/etc/systemd/system/bitcoind.service
b/filesystem/etc/systemd/system/bitcoind.service
index 1a754e9b1745bfd564dd8a25baa46ead50ebb87d..1c3377f3e1c13009303db8e73548d0fc2b9a59e3 100644
(file)
--- a/
filesystem/etc/systemd/system/bitcoind.service
+++ b/
filesystem/etc/systemd/system/bitcoind.service
@@
-1,5
+1,5
@@
# iank: copied from /a/opt/bitcoin/contrib/init/bitcoind.service
# iank: copied from /a/opt/bitcoin/contrib/init/bitcoind.service
-# for sources as of 202
2-11-14
+# for sources as of 202
4-04-22
# It is not recommended to modify this file in-place, because it will
# be overwritten during package upgrades. If you want to add further
# It is not recommended to modify this file in-place, because it will
# be overwritten during package upgrades. If you want to add further
@@
-25,10
+25,11
@@
Wants=network-online.target
# between 100% and 180% cpu and makes the fan spin annoyingly.
# 50% still had annoying fan spin. trying out 20%
CPUQuota=20%
# between 100% and 180% cpu and makes the fan spin annoyingly.
# 50% still had annoying fan spin. trying out 20%
CPUQuota=20%
-ExecStart=/usr/bin/bitcoind -daemonwait \
- -pid=/run/bitcoind/bitcoind.pid \
+ExecStart=/usr/bin/bitcoind -pid=/run/bitcoind/bitcoind.pid \
-conf=/etc/bitcoin/bitcoin.conf \
-conf=/etc/bitcoin/bitcoin.conf \
- -datadir=/var/lib/bitcoind
+ -datadir=/var/lib/bitcoind \
+ -startupnotify='systemd-notify --ready' \
+ -shutdownnotify='systemd-notify --stopping'
# Make sure the config directory is readable by the service user
PermissionsStartOnly=true
# Make sure the config directory is readable by the service user
PermissionsStartOnly=true
@@
-37,8
+38,10
@@
ExecStartPre=/bin/chgrp bitcoin /etc/bitcoin
# Process management
####################
# Process management
####################
-Type=forking
+Type=notify
+NotifyAccess=all
PIDFile=/run/bitcoind/bitcoind.pid
PIDFile=/run/bitcoind/bitcoind.pid
+
Restart=on-failure
TimeoutStartSec=infinity
TimeoutStopSec=600
Restart=on-failure
TimeoutStartSec=infinity
TimeoutStopSec=600
@@
-85,5
+88,8
@@
PrivateDevices=true
# Deny the creation of writable and executable memory mappings.
MemoryDenyWriteExecute=true
# Deny the creation of writable and executable memory mappings.
MemoryDenyWriteExecute=true
+# Restrict ABIs to help ensure MemoryDenyWriteExecute is enforced
+SystemCallArchitectures=native
+
[Install]
WantedBy=multi-user.target
[Install]
WantedBy=multi-user.target
diff --git
a/filesystem/usr/local/bin/bitcoinon
b/filesystem/usr/local/bin/bitcoinon
index 0b64d4de7f2eda617515b3ddf4a47c3ab87709e9..d2509c780eb52ef2b81e7caddbf034203f9df203 100755
(executable)
--- a/
filesystem/usr/local/bin/bitcoinon
+++ b/
filesystem/usr/local/bin/bitcoinon
@@
-22,7
+22,7
@@
[[ $EUID == 0 ]] || exec sudo "${BASH_SOURCE[0]}"
[[ $EUID == 0 ]] || exec sudo "${BASH_SOURCE[0]}"
-if [[ -e /tmp/no-bitcoinon ]]; then
+if [[ -e /tmp/no-bitcoinon
|| ! -d /var/lib/bitcoind || ! -x /usr/bin/bitcoind
]]; then
exit 0
fi
systemctl start bitcoind
exit 0
fi
systemctl start bitcoind
diff --git
a/machine_specific/btrbk.hosts
b/machine_specific/btrbk.hosts
index 43e86f217c2bace3fa526b3f1b5c81ce4c4c70c6..54f98fb4b38b1c9398f14e68c92d592e0b92bbe8 100644
(file)
--- a/
machine_specific/btrbk.hosts
+++ b/
machine_specific/btrbk.hosts
@@
-4,4
+4,5
@@
x2
x3
frodo
sy
x3
frodo
sy
+so
bo
bo
diff --git
a/machine_specific/s76.hosts
b/machine_specific/s76.hosts
index 90a6702341f5c73816196a71147508bba73e32c3..23f1aa3781559b68f20fa71f2ed8b6ed97d44a1c 100644
(file)
--- a/
machine_specific/s76.hosts
+++ b/
machine_specific/s76.hosts
@@
-1,2
+1,3
@@
bo
sy
bo
sy
+so
diff --git
a/mail-setup
b/mail-setup
index 050a716b2255ea78ce73fe5f646980ad659af6e1..9ada9b6c5060c54ba2e8d1e3ca1df52c642634e9 100755
(executable)
--- a/
mail-setup
+++ b/
mail-setup
@@
-2868,7
+2868,7
@@
debbugsconfig
# ld for local debbugs
# ld for local debbugs
-/a/exe/web-conf -t -a 127.0.1.1 -p 80 -r /var/lib/debbugs/www - apache2 ld <<'EOF'
+/a/exe/web-conf -
l -
t -a 127.0.1.1 -p 80 -r /var/lib/debbugs/www - apache2 ld <<'EOF'
# copied from debbugs upstream example
<Directory /var/lib/debbugs/www>
Options Indexes SymLinksIfOwnerMatch MultiViews
# copied from debbugs upstream example
<Directory /var/lib/debbugs/www>
Options Indexes SymLinksIfOwnerMatch MultiViews
diff --git
a/switch-mail-host
b/switch-mail-host
index 56676b9b408d487651b93a3f18ddc71efaf5ba6c..053134aac9ace8b5981e551c2653851899c6c29e 100644
(file)
--- a/
switch-mail-host
+++ b/
switch-mail-host
@@
-395,12
+395,4
@@
if (( ret )); then
exit $ret
fi
exit $ret
fi
-if ! $mail_only && [[ -e /p/profanity-here ]]; then
- m $new_shell systemctl --now enable profanity || ret=$?
- if (( ret )); then
- err "failed final systemctl --now enable profanity, just fix and rerun"
- exit $ret
- fi
-fi
-
m exit 0
m exit 0