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 | |
# Requires: | |
# - restic (system package) | |
# - AWS account with SNS topic configured, S3 bucket created, and API keys created | |
# - awscli (pip) with API keys configured (aws configure) | |
# - cron implementation (system package) | |
ResticBinaryPath=`which restic` | |
AwsCliBinaryPath=`which aws` |
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 | |
# Requires: | |
# - restic (system package) | |
# - AWS account with SNS topic configured and API keys created | |
# - awscli (pip) with API keys configured (aws configure) | |
# - Backblaze B2 account with API keys | |
# - cron implementation (system package) | |
ResticBinaryPath=`which restic` |
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 | |
## Checks a systemd controlled service for status and start failures | |
SVC_NAME='servicename' | |
COUNT_FILE='/tmp/checkservice.counter' | |
# load counter from previous checks | |
[ -f $COUNT_FILE ] && { COUNT=`cat $COUNT_FILE` ; } || { COUNT=0 ; } |
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
# maintenance | |
alias sysupgrade='yaourt -S -y -u --aur' | |
# operations | |
function gpkill () { | |
if [ $1 ] ; then | |
TargetPid=`pgrep $1` | |
echo 'Sending sigterm' | |
kill -15 $TargetPid | |
sleep 2 |
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 | |
# | |
# usage: $0 <cpu-threads> | |
# | |
# i use this script to schedule times of day when my computer is not in use can max out cpu on the miner | |
# | |
# example cron entries: | |
# 00 06 * * * /path/to/xmr-mining-scheduler.sh 3 | |
# 00 23 * * * /path/to/xmr-mining-scheduler.sh 4 |
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 | |
echo "Warning: The UPS's battery power is not enough, system will be shutdown soon!" | wall | |
export RECEIPT_NAME | |
export RECEIPT_ADDRESS | |
export SENDER_ADDRESS | |
# | |
# If you want to receive event notification by e-mail, you must change 'ENABLE_EMAIL' item to 'yes'. | |
# Note: After change 'ENABLE_EMAIL' item, you must asign 'RECEIPT_NAME', 'RECEIPT_ADDRESS', and |
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 | |
# migrate.sh | |
# DESCRIPTION: Parse two directories of logfiles. | |
# FUNCTION: Append new files with old ones, delete files that are small, and move new files that aren't present to the old directory. | |
# USAGE: bash migrate.sh /path/to/old_logdir /path/to/new_logdir | |
# ELABORATION: | |
# Settings | |
minlines=15 # Threshhold number of lines to delete a logfile |
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 | |
## Description: | |
# Sync files to and create lists of directory contents in a LUKS container volume and upload it to S3 | |
# Good for periodic backup jobs | |
# Supports rate limiting, encryption in transit and at rest and file path exclusions | |
## Usage: | |
# bash $0 |
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 | |
# Dependencies (you must have these already installed on your system) | |
# - jq, JSON processor written in C | |
# - bc, arbitrary precision numer processor | |
# - curl, for transferring data given an URL | |
if [ -z $1 ] ; then | |
echo 'Pass an argument of the imdb.com list ID i.e. ls123456789 found in the URL' | |
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
access_key = | |
secret_key = | |
check_ssl_certificate = False | |
cloudfront_host = IP_OR_FQDN:80 | |
host_base = s3.cloudian.com:18080 | |
host_bucket = %(bucket)s.FQDN:80 | |
# host_bucket = IP:80/%(bucket)s | |
signature_v2 = False | |
simpledb_host = IP_OR_FQDN:80 |
NewerOlder