This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# sub2rbl for padavan firmware @ProBackup-nl | |
# ============ | |
# Subscribes to IP or CIDR (netblock) RBLs; auto-integrates into iptables | |
# Purely for reduced memory consumption it creates two IP sets: | |
# 1. one for unicast IPs (sub2rbl) | |
# 2. the other one for CIDR (sub2rbl-net) blocks | |
# Realtime block lists contain both types | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ $# = 0 ] || [ $1 = -h ]; then cat <<EOF | |
-------------------------------------------------------------------------- | |
Pro Backup's handy rotating-filesystem-backup utility for Padavan firmware | |
-------------------------------------------------------------------------- | |
It makes rotating backup-snapshots of /opt and /etc/storage when called | |
to a disk that must be prepared with label "Backup". (mkfs.ext4 -L Backup) | |
Installation: # curl -O https://gist.githubusercontent.com/ProBackup-nl/82fb02c67dc05ca0310d0f9f8e8be14c/raw/68bc28dbdcd7815feb6b5c2715ff121c44e03575/backup.sh && chmod 755 backup.sh && mkdir /opt/usr/sbin && mv backup.sh /opt/usr/sbin/backup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# -------------------------------------------------------- | |
# Shell gister to POST or PATCH a single file as public gist. | |
# PATCH does gist ID lookup: no need to remember gist ID's | |
# -------------------------------------------------------- | |
# usage: $ pgist file_to_post_or_patch.extension | |
# | |
# installation: $ curl -O https://gist.githubusercontent.com/ProBackup-nl/3971a45b21749cfff6c0069d3dad1dde/raw/pgist.sh && chmod 755 pgist.sh && mv pgist.sh /opt/usr/sbin/pgist | |
# | |
# tested with Busybox (ash shell) + Entware (opkg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# save as /opt/etc/init.d/S05syslogd | |
# chmod +x,go-w /opt/etc/init.d/S05syslogd | |
# /opt/etc/init.d/S05syslogd start | |
MOUNT=/media/Main | |
FOLDER=/Syslog | |
# better not change anything below here | |
SOURCE=/tmp/syslog.log # original source of the syslog on /tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ddrescue on a directory recursively (using find) | |
# skipping existing equally sized targets | |
# preservering metadata | |
# inspired by the-mikedavis ddrfind.fish | |
if [ -z $1 ] || [ ! -d $1 ] || [ -z $2 ] || [ ! -d $2 ]; then | |
echo "Usage: ddrfind.sh <input-dir> <output-dir-that-exists>" | |
echo "Example: ddrfind.sh /Volumes/A/folder-to-rescue /Volumes/B" | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Preferred installation method | |
# nano /etc/profile.d/motd.sh;chmod +x /etc/profile.d/motd.sh | |
## <paste this> | |
# | |
# Alternative installation method | |
# nano /usr/bin/motd.sh;chmod +x /usr/bin/motd.sh | |
## <paste this> | |
# patch.sh or # patch -d/ --dry-run -p0 -i ~/patch.txt | |
# don't: # echo "session optional pam_exec.so stdout /usr/bin/motd.sh" >> /etc/pam.d/system-login |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Ceriel Jacobs <2010 at probackup dot nl> | |
# Contributor: Bartłomiej Piotrowski <[email protected]> | |
# Contributor: Jozef Holly <[email protected]> | |
pkgname=influxdb2-bin | |
pkgver=2.0.7 | |
pkgrel=1 | |
pkgdesc='Scalable datastore for metrics, events, and real-time analytics; Binary release;' | |
arch=('x86_64' 'aarch64') | |
url="https://portal.influxdata.com/downloads/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# nano ~/.bashrc # note: user=root without sudo | |
--- | |
function locate_f() | |
{ | |
sudo find / -regextype posix-extended -regex "/(afs|media|mnt|net|sfs|sys|tmp|proc|udev)" -prune -o -path "*$1*" -print 2>/dev/null | |
} | |
alias locate=locate_f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script that runs a write endurance torture test, intended to measure SD card endurance. | |
# Like "Anvil's Storage Utilities" endurance test for command line Linux | |
# Check if running as root | |
if [[ "$(id -u)" -ne 0 ]]; then | |
echo "ERROR: Must be run as root" >&2 | |
exit 2 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Store DSMR telegrams from P1 into influxdb 2.0 and pvoutput.org | |
# EN-IEC 62056-21, Part 21: direct local data exchange, 2002-05 | |
# WARNING: influxdb will crash/become a memory hog after collecting a few months of data !!! | |
#- Requires python2+ | |
#- Install deps | |
# # pacman -S python-requests python-pytz | |
#- Create script |
OlderNewer