Merge branch 'master' of https://git.mount-mockery.de/dirk/bin
This commit is contained in:
commit
bcf9563649
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -1,3 +1,9 @@
|
|||||||
[submodule "nagios"]
|
[submodule "nagios"]
|
||||||
path = nagios.src
|
path = nagios.src
|
||||||
url = https://git.mount-mockery.de/pylib/nagios.git
|
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
|
||||||
|
@ -3,11 +3,13 @@
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Additional Packages
|
# 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 curlftpfs"
|
||||||
COMMON="$COMMON tlp tlp-rdw"
|
COMMON="$COMMON tlp tlp-rdw"
|
||||||
COMMON="$COMMON fonts-powerline"
|
COMMON="$COMMON fonts-powerline"
|
||||||
COMMON="$COMMON nextcloud-desktop dolphin-nextcloud"
|
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"
|
# COMMON="$COMMON fonts-powerline powerline powerline-gitstatus"
|
||||||
|
|
||||||
MULTIMEDIA="rhythmbox ario kodi kodi-pvr-hts"
|
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"
|
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
|
ALL=$COMMON\ $MULTIMEDIA\ $TOOLS\ $PROGRAMMING
|
||||||
|
20
dnsleases
20
dnsleases
@ -1,6 +1,7 @@
|
|||||||
#!/bin/python3
|
#!/bin/python3
|
||||||
#
|
#
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
import time
|
import time
|
||||||
|
|
||||||
class host(object):
|
class host(object):
|
||||||
@ -87,7 +88,22 @@ with open('/var/lib/misc/dnsmasq.leases', 'r') as fh:
|
|||||||
if h.mac not in hl:
|
if h.mac not in hl:
|
||||||
hl.append(h)
|
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(hl.vlan_list(vlan))
|
||||||
print()
|
print()
|
||||||
|
@ -3,7 +3,12 @@
|
|||||||
git config --global user.name "Dirk Alders"
|
git config --global user.name "Dirk Alders"
|
||||||
git config --global user.email dirk@mount-mockery.de
|
git config --global user.email dirk@mount-mockery.de
|
||||||
#
|
#
|
||||||
|
git config --global pull.rebase false
|
||||||
|
#
|
||||||
git config --global diff.tool meld
|
git config --global diff.tool meld
|
||||||
git config --global merge.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 --add difftool.prompt false
|
||||||
git config --global pull.rebase false
|
#
|
||||||
|
git config --global credential.helper store
|
||||||
|
|
||||||
|
4
mqtt_sniffer
Executable file
4
mqtt_sniffer
Executable 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
16
mqtt_test_smarthome
Executable 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
8
nas_halt
Executable 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
|
6
pyrip
Executable file
6
pyrip
Executable 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
1
pyrip.src
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 48dc481f268e1ecdcd8d5e0126df553781e40a78
|
Loading…
x
Reference in New Issue
Block a user