Skip to content

Instantly share code, notes, and snippets.

while :
do
# show menu
echo -e "${green}${bold}Do you want to delete these failed backups? [y/n?]${NC}${normal}"
read yno
case $yno in
[yY] | [yY][Ee][Ss] )
echo "Agreed, which is to bad since it doesn't do anything yet.";
#Uncomment this to actually delete those bad backups sudo find $DIR/ -maxdepth 1 -mindepth 1 ! -name "*.img" -exec md5sum {} \;
exit 0
@nathandarnell
nathandarnell / Backup RPi2 SD Card.sh
Last active August 29, 2015 14:00
Backup of some of my more important scripts and configs
#!/bin/bash
# Setting up backup directories
SUBDIR=RaspberryPi2_backups
DIR=/media/1TB/$SUBDIR
# Setting up echo fonts
red='\e[0;31m'
green='\e[0;32m'
cyan='\e[0;36m'
#!/bin/bash
#Copied from wintermute at http://forum.subsonic.org/forum/viewtopic.php?t=1546
#and adjusted to be more genaric and capable of being quickly adapted for multiple programs
#Haven't actually tested this yet though... 5/1/2014
PROGRAM=
PID=""
PATH=
function get_pid {
PID=`ps ax |grep java |grep $PROGRAM |cut -d " " -f 1`
#!/bin/bash
## Author: RonB123123
## Created: Sept 24, 2008
## Description:
## Checks if the MySQL + Apache services are running, if not
## not then start each service.
##From http://ubuntuforums.org/showthread.php?t=928475
echo "Options"
#!/bin/bash
## Author: RonB123123
## Created: Sept 24, 2008
## Description:
## Checks if the MySQL + Apache services are running, if not
## not then start each service.
##From http://ubuntuforums.org/showthread.php?t=928475
echo "Options"
echo "1 - Start"
@nathandarnell
nathandarnell / RPiBackup.sh
Last active August 29, 2015 14:00
My take on a script to make full DD backups of my SD Card to an external drive
#!/bin/bash
## Original Author: RonB123123
## Created: Sept 24, 2008
## From http://ubuntuforums.org/showthread.php?t=928475
## Also includes some code from various other sources
## Changed by Nathan Darnell
## Adapted by me to work on my RPi systems and be more flexible
## Comments welcome as I am more of a Google-r than a programmer
## TODO: save to a logfile, change to all functions,