Skip to content

Instantly share code, notes, and snippets.

View marvin-marvin's full-sized avatar
⌨️
https://gist.github.com/marvin-marvin

Marvin marvin-marvin

⌨️
https://gist.github.com/marvin-marvin
View GitHub Profile
@marvin-marvin
marvin-marvin / openvpn_server.conf
Created February 17, 2023 09:06
openvpn_server
local 172.16.1.75
port 443
proto tcp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh.pem
auth SHA512
tls-crypt tc.key
@marvin-marvin
marvin-marvin / journald.conf
Created February 17, 2023 09:04
journald_max_100M
[Journal]
SystemMaxUse=100M
@marvin-marvin
marvin-marvin / syslog_send.conf
Created February 17, 2023 09:03
syslog_send
# /etc/rsyslog.d/syslog_send.conf
*.* @log.at.home:514
$ActionQueueFileName queue
$ActionQueueMaxDiskSpace 1g
$ActionQueueSaveOnShutdown on
$ActionQueueType LinkedList
$ActionResumeRetryCount -1
@marvin-marvin
marvin-marvin / cleanup_logs.sh
Created February 17, 2023 09:00
cleanup_logs
#sudo crontab -e
0 0 * * * /usr/bin/find /var/log -name "*.gz" -type f -mtime +30 -exec rm -f {} \; -print >> /var/log/cron_delete.log
@marvin-marvin
marvin-marvin / startifdown_pihole-FTL.sh
Created February 17, 2023 08:59
startifdown_pihole-FTL
#!/bin/bash
#Scripts to start services if not running
ps -ef | grep pihole-FTL |grep -v grep > /dev/null
if [ $? != 0 ]
then
systemctl restart pihole-FTL >> /var/log/pihole_autorestart.log
fi
@marvin-marvin
marvin-marvin / living-room-shutter-beep.sh
Created December 12, 2022 10:38
living-room-shutter-beep
/usr/bin/curl -X POST -d '{"id":1, "src":"user_1", "method":"Shelly.SetState", "params":{"id":1, "type":4, "state":{"tgt_pos": 0}}}' http://172.16.0.238/rpc ; /bin/sleep 30 ; /usr/bin/curl -X POST -d '{"id":1, "src":"user_1", "method":"Shelly.SetState", "params":{"id":1, "type":4, "state":{"tgt_pos": 100}}}' http://172.16.0.238/rpc ; /bin/sleep 30 ; /usr/bin/curl -X POST -d '{"id":1, "src":"user_1", "method":"Shelly.SetState", "params":{"id":1, "type":4, "state":{"tgt_pos": 0}}}' http://172.16.0.238/rpc ; /bin/sleep 30 ; /usr/bin/curl -X POST -d '{"id":1, "src":"user_1", "method":"Shelly.SetState", "params":{"id":1, "type":4, "state":{"tgt_pos": 100}}}' http://172.16.0.238/rpc ; /bin/sleep 30 ; /usr/bin/curl -X POST -d '{"id":1, "src":"user_1", "method":"Shelly.SetState", "params":{"id":1, "type":4, "state":{"tgt_pos": 0}}}' http://172.16.0.238/rpc ; /bin/sleep 30 ; /usr/bin/curl -X POST -d '{"id":1, "src":"user_1", "method":"Shelly.SetState", "params":{"id":1, "type":4, "state":{"tgt_pos": 100}}}' http://172
@marvin-marvin
marvin-marvin / howtostart
Created December 12, 2022 10:33
fritz_sniff
nohup ./sniff_lan.sh &
@marvin-marvin
marvin-marvin / living-room-shutter-sun.sh
Created June 3, 2022 12:01
living-room-shutter-sun
/usr/bin/curl -X POST -d '{"id":1, "src":"user_1", "method":"Shelly.SetState", "params":{"id":1, "type":4, "state":{"tgt_pos": 0}}}' http://172.16.0.238/rpc ; /bin/sleep 20 ; /usr/bin/curl -X POST -d '{"id":1, "src":"user_1", "method":"Shelly.SetState", "params":{"id":1, "type":4, "state":{"state": 10}}}' http://172.16.0.238/rpc ; /bin/sleep 10 ; /usr/bin/curl -X POST -d '{"id":1, "src":"user_1", "method":"Sys.Reboot", "params":{"id":1, "type":4, "state":true}}' http://172.16.0.238/rpc
@marvin-marvin
marvin-marvin / update_esxi.txt
Last active February 17, 2022 19:20
update_esxi
# update esxi
esxcli network firewall ruleset set -e true -r httpClient
esxcli software profile update -p ESXi-7.0U2e-19290878-standard --no-hardware-warning -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
esxcli network firewall ruleset set -e false -r httpClient
OR
esxcli software sources profile list -d /vmfs/volumes/<DataStore-Name>/<Update-Datei>.zip
esxcli software profile update -d /vmfs/volumes/<DataStore-Name>/<Update-Datei>.zip -p <Image-Profile>
@marvin-marvin
marvin-marvin / reset_wipe_etcd.sh
Created February 3, 2021 15:21
reset_wipe_etcd.sh
# reset/wipe etcd on each node
systemctl stop etcd
rm -rf /var/lib/etcd/member
systemctl start etcd
sleep 5
systemctl status etcd