prof() {
command prof &>/dev/null &
}
-# self chat. chatlog messages to myself.
+# self chat. record messages to myself.
sc() {
while read -r l; do
printf '\033[1A\033[K'; printf "%s\n" "$l"| ts "%F %T" | tee -a /p/self-chat.log
quit
EOF
- chronic nsupdate $ip_arg -k /p/c/machine_specific/vps/filesystem/etc/bind/Kb8.nz.*.private <$tmpf || nsupdate_fails=$((nsupdate_fails + 1))
+ chronic nsupdate $ip_arg -k /p/c/user_specific/bind/etc/bind/Kb8.nz.*.private <$tmpf || nsupdate_fails=$((nsupdate_fails + 1))
sed -i 's/^server .*/server bk.b8.nz/' $tmpf
- chronic nsupdate $ip_arg -k /p/c/machine_specific/vps/filesystem/etc/bind/Kb8.nz.*.private <$tmpf || nsupdate_fails=$((nsupdate_fails + 1))
+ chronic nsupdate $ip_arg -k /p/c/user_specific/bind/etc/bind/Kb8.nz.*.private <$tmpf || nsupdate_fails=$((nsupdate_fails + 1))
if (( nsupdate_fails > nsupdate_fail_limit )); then
echo error: nsupdate is persistently failing >&2
exit 1
--- /dev/null
+#!/bin/bash
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to change
+# to a recommended GPL license.
+
+# Copyright 2024 Ian Kelling
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+case $PWD in
+ /p/c|/p/c/*|/q/p/c|/q/p/c/*)
+ orig_umask=$(umask)
+ umask 0077
+ /usr/bin/git "$@"
+ umask "$orig_umask"
+ ;;
+ *)
+ /usr/bin/git "$@"
+ ;;
+esac
if systemctl show -p SubState --value ${services[@]} | grep -E -v '^(running|)$' &>/dev/null; then
for s in ${services[@]}; do
if [[ $(systemctl show -p SubState --value $s 2>&1) != running ]]; then
+ chars+=($s)
bads+=($s)
fi
done
- chars+=(MYSERS)
fi
p ${bads[*]} | lo -240 mysers
;;
if systemctl show -p SubState --value ${services[@]} | grep -E -v '^(running|)$' &>/dev/null; then
for s in ${services[@]}; do
if [[ $(systemctl show -p SubState --value $s 2>&1) != running ]]; then
+ chars+=($s)
bads+=($s)
fi
done
- chars+=(PROM)
fi
p ${bads[*]} | lo -240 prom
;;