Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Set our rules so the debian-transmission user group can only route through the vpn
# https://askubuntu.com/questions/37412/how-can-i-ensure-transmission-traffic-uses-a-vpn
sudo apt-get install iptables
sudo apt-get install iptables-persistent
sudo apt-get install transmission-cli
sudo apt-get install transmission-daemon
iptables -F
NET=192.168.100.0/24
GROUP=debian-transmission
#!/bin/bash
# moveblockstoHDD.sh
# Moves blocks from SSD to HDD
set -e
BLK_TARGET=/mnt/omv/blocks
WORKDIR=/mnt/bitcoin/bitcoin/blocks
# How many files to move PER TYPE
LIMIT=100
## Download Monitor v0.2 - June 2017
# Set the interface you wish to monitor, eg: eth0, wlan0, usb0
# enp4s0 ist die andere Buchse
INTERFACE = "enp3s0"
# Set the minimum download speed in KB/s that must be achieved.
MINIMUM_SPEED = 2
# Set the number of retries to test for the average minimum speed.
#!/bin/bash
#logging is in /var/log/syslog
IP='192.168.100.102'
MAC='D0:50:99:0F:8E:E9'
SUCCESS='OMV alive, starting Mediathekview'
FAIL='ERROR - - - OMV down - - -,'
wakeonlan $MAC 2>&1 | logger &
sleep 30
# mcd: menu driven cd (intended for .bashrc)
function mcd {
PS3="Which directory: "
select d in '/some/common/path/i/use/'\
'/another/common/path/'\
'/and/so/forth/'
do
cd $d
break
sudo systemctl restart systemd-resolved