Skip to content

Instantly share code, notes, and snippets.

@tongpu
tongpu / Init script for Taskserver
Created May 14, 2014 21:04
Taskserver Init and Logrotate configuration for Debian
#! /bin/sh
### BEGIN INIT INFO
# Provides: taskd
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts Taskserver
# Description: Starts Taskserver using start-stop-daemon
@tongpu
tongpu / dirvish-statusmail.py
Created January 28, 2014 23:30
A simple script to send an email with important information about a dirvish backup run via email. Also sends an extra email on error. Add it to post-server in your dirvish.conf. Based losely on http://wiki.dirvish.org/FuhHoe
#!/usr/bin/env python
from email.mime.text import MIMEText
import os
import re
import smtplib
mailfrom = 'from@example.com'
mailto = 'to@example.com'
mailerr = 'err@example.com'