This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 | |
| # |
NewerOlder