Skip to content

Instantly share code, notes, and snippets.

@udienz
udienz / make-json
Created February 20, 2014 10:42
Make JSON from sedot
#!/usr/bin/env bash
. `dirname $0`/../lib/init.sh
. $BASE/lib/common.sh
NODE=$1
if [ "$NODE" == "" ]; then
NODE=$HOST
fi
@udienz
udienz / debian-cd.sh
Last active December 26, 2015 07:29
Debian CD Mirror script, used at buaya.klas.or.id. See https://github.com/udienz/status and http://www.debian.org/CD/mirroring/#jigdomirror
#!/bin/bash
# Stolen from http://ftp.mgts.by/debian-mirror/cdimage/
#BASE=/srv/buaya.klas.or.id/status
. "$BASE/status/lib/init.sh"
. "$BASE/status/lib/common.sh"
DELETEFIRST=1
tmpDirBase=$(mktemp -d)
@udienz
udienz / php-fastcgi
Created April 30, 2013 10:30
php-fastcgi
#!/bin/bash
### BEGIN INIT INFO
# Provides: php-fcgi
# Required-Start: $nginx
# Required-Stop: $nginx
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts php over fcgi
# Description: starts php over fcgi
### END INIT INFO
Name: update.jaunty
Method: http://mirror.unej.ac.id/ubuntu
Suite: jaunty
VerifyRelease: blindtrust
Architectures: i386 amd64 source
Components: main contrib non-free
UDebComponents: main restricted
Name: update.jaunty-updates
Method: http://mirror.unej.ac.id/ubuntu
Name: pull.jaunty
From: nanggar
Name: pull.jaunty-updates
From: nanggar-updates
Name: pull.jaunty-security
From: nanggar-security
Name: pull.nanggar
basedir /home/udienz/reprepro
confdir /home/udienz/reprepro/conf
dbdir /home/udienz/reprepro/db
outdir /home/udienz/reprepro/repository
#!/bin/sh
# This is an example script that can be hooked into reprepro
# to generate a hierachy like packages.debian.org/changelogs/
# All you have to do is to copy it into you conf/ directory,
# and add the following to any distribution in conf/distributions
# you want to have changelogs and copyright files extracted:
#Log:
# --type=dsc changelogs.example
# (note the space at the beginning of the second line).
# This will cause this script to extract changelogs for all
Origin: Jerux
Label: Jerux
Codename: jaunty
Suite: jaunty
Components: main contrib non-free
UDebComponents: main contrib non-free
Architectures: i386 amd64 source
Version: 5.0
Description: Jerux 5 jaunty
Update: - update.jaunty
#! /bin/sh
set -e
# This script originates from http://www.debian.org/mirror/anonftpsync
# CVS: cvs.debian.org:/cvs/webwml - webwml/english/mirror/anonftpsync
# Version: $Id: anonftpsync,v 1.43 2008-06-15 18:16:04 spaillar Exp $
# Note: You MUST have rsync 2.6.4 or newer, which is available in sarge
# and all newer Debian releases, or at http://rsync.samba.org/
#!/bin/bash
VERBOSE=""
if echo "$@" | grep -q -- "-v"; then
VERBOSE=1
fi
HOSTNAME="$(hostname -f)"
## The mirror to use