This commit is contained in:
Dirk Alders 2025-05-04 12:00:11 +02:00
commit bcf9563649
10 changed files with 73 additions and 5 deletions

6
.gitmodules vendored
View File

@ -1,3 +1,9 @@
[submodule "nagios"]
path = nagios.src
url = https://git.mount-mockery.de/pylib/nagios.git
[submodule "pyrip"]
path = pyrip
url = https://git.mount-mockery.de/application/pyrip.git
[submodule "pyrip.src"]
path = pyrip.src
url = https://git.mount-mockery.de/application/pyrip.git

View File

@ -3,11 +3,13 @@
#
# Additional Packages
COMMON="keepass2 xdotool systemd-sysv openssh-server vim-nox tree"
COMMON="keepassx systemd-sysv openssh-server vim-nox tree"
# COMMON="$COMMON curlftpfs"
COMMON="$COMMON tlp tlp-rdw"
COMMON="$COMMON fonts-powerline"
COMMON="$COMMON nextcloud-desktop dolphin-nextcloud"
# Use KDE-Wayland and activate maliit under System (Search Virtual Keyboard)
COMMON="$COMMON maliit-keyboard"
# COMMON="$COMMON fonts-powerline powerline powerline-gitstatus"
MULTIMEDIA="rhythmbox ario kodi kodi-pvr-hts"
@ -16,7 +18,7 @@ MULTIMEDIA="$MULTIMEDIA qjackctl carla carla-lv2 carla-vst ardour calf-plugins e
TOOLS="wavemon evolution retext gnuplot latexmk texlive-latex-recommended texlive-latex-extra texlive-lang-german texlive-plain-generic texlive-fonts-recommended"
PROGRAMMING="python-is-python3 python3-venv pkgconf libgtk2.0-dev jq meld"
PROGRAMMING="python-is-python3 python3-venv python3-wxgtk4.0 pkgconf libgtk2.0-dev jq meld"
ALL=$COMMON\ $MULTIMEDIA\ $TOOLS\ $PROGRAMMING

View File

@ -1,6 +1,7 @@
#!/bin/python3
#
import subprocess
import sys
import time
class host(object):
@ -87,7 +88,22 @@ with open('/var/lib/misc/dnsmasq.leases', 'r') as fh:
if h.mac not in hl:
hl.append(h)
for vlan in [20, 30, 40, 50, 60, 90]:
print("Hosts in VLAN %d" % vlan)
VLANs = {
20: "Network Devices - Switch, AP, ...",
30: "Private VLAN",
40: "Smarthome with Internet",
50: "Smarthome no Internet",
60: "Guest VLAN",
}
try:
PRINT_LIST = [int(sys.argv[1]), ]
except (IndexError, ValueError) as e:
PRINT_LIST = VLANs.keys()
for vlan in PRINT_LIST:
print(f"Hosts in VLAN {vlan} - {VLANs.get(vlan, 'Unknown')}")
print(hl.vlan_list(vlan))
print()

View File

@ -3,7 +3,12 @@
git config --global user.name "Dirk Alders"
git config --global user.email dirk@mount-mockery.de
#
git config --global pull.rebase false
#
git config --global diff.tool meld
git config --global merge.tool meld
git config --global merge.tool.cmd 'meld --auto-merge "$LOCAL" "$BASE" "$REMOTE" --output "$MERGED"'
git config --global --add difftool.prompt false
git config --global pull.rebase false
#
git config --global credential.helper store

4
mqtt_sniffer Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
#
/opt/mqtt_sniffer/venv/bin/python /opt/mqtt_sniffer/mqtt_sniffer.py $*

16
mqtt_test_smarthome Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
clear
#!/bin/sh
#
for s in $(tmux list-sessions -F '#{session_name}'); do
p=$(tmux list-panes -F '#{pane_tty}' -t "$s")
if [ "$p" = "$(tty)" ]; then
# Session already running
exit 0
fi
done
tmux attach-session -t mqtt_test_smarthome || tmux new-session -s mqtt_test_smarthome "/opt/mqtt_sniffer/venv/bin/python /opt/mqtt_sniffer/mqtt_sniffer.py -f mqtt.home -p 1884 -n"

8
nas_halt Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
#
if [ $# == 0 ]
then
ssh nas sudo /usr/sbin/shutdown -P 5
else
ssh nas sudo /usr/sbin/shutdown -P $1
fi

4
nas_wake Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
#
wakeonlan 38:ea:a7:a6:03:9d

6
pyrip Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
#
BASEDIR=$(dirname $0)
$BASEDIR/pyrip.src/venv/bin/python $BASEDIR/pyrip.src/pyrip.py $*

1
pyrip.src Submodule

@ -0,0 +1 @@
Subproject commit 48dc481f268e1ecdcd8d5e0126df553781e40a78