Skip to content

Instantly share code, notes, and snippets.

View mshuler's full-sized avatar
💭
ヽ(´ー`)ノ

Michael Shuler mshuler

💭
ヽ(´ー`)ノ
View GitHub Profile
@mshuler
mshuler / lrsync.lua
Created December 3, 2020 16:41 — forked from kashyapp/lrsync.lua
lsyncd and configuration
local hostname = os.getenv("HOSTNAME")
local package = os.getenv("PACKAGE")
assert(hostname, "HOSTNAME env variable is not set")
assert(package, "PACKAGE env variable is not set")
local privateKey = "/usr/share/" .. package .. "/etc/id_rsa"
settings {
statusFile = "/var/run/" .. package .. "/lsyncd.stat",
statusInterval = 60,

This is a mini-HOWTO for setting up Linux Containers (LXC) on Ubuntu. This guide focuses on the creation of a web server with good process isolation and firewalling.

Dependencies

apt-get install lxc

Create a container

#! /bin/bash
# Kill processes orphaned by Jenkins
# Work around Java's use of SIGTERM rather than SIGKILL and
# Jenkins's lack of any workaroud in the box.
# here is the relevant bug:
# https://issues.jenkins-ci.org/browse/JENKINS-17116
# Suggested usage: