Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am tongpu on github.
  • I am tongpu (https://keybase.io/tongpu) on keybase.
  • I have a public key whose fingerprint is 1E96 34C1 837F F412 EB1A D7AB D807 26D9 F4F0 14C4

To claim this, I am signing this object:

@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 = '[email protected]'
mailto = '[email protected]'
mailerr = '[email protected]'