Initial commit

This commit is contained in:
2013-08-30 00:57:40 +01:00
commit a0c1a52d24
3 changed files with 84 additions and 0 deletions

21
Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
# version 0.0.1
# docker-version 0.6.1
from ubuntu:12.04
maintainer Jim Myhrberg "contact@jimeh.me"
# Make sure the package repository is up to date.
run echo "deb http://archive.ubuntu.com/ubuntu precise-backports universe" >> /etc/apt/sources.list
run apt-get update
# Let's do this...
run apt-get install -y znc/precise-backports znc-dbg/precise-backports znc-dev/precise-backports znc-extra/precise-backports znc-perl/precise-backports znc-python/precise-backports znc-tcl/precise-backports && apt-get clean
run useradd znc
add start-znc /usr/local/bin/
add znc.conf.default /src/
user znc
expose 6667
entrypoint ["/usr/local/bin/start-znc"]
cmd [""]

31
start-znc Executable file
View File

@@ -0,0 +1,31 @@
#! /usr/bin/env bash
# Options.
DATADIR="/znc-data"
# Build modules from source.
if [ -d "${DATADIR}/modules" ]; then
# Store current directory.
cwd="$(pwd)"
# Find module sources.
modules=$(find "${DATADIR}/modules" -name "*.cpp")
# Build modules.
for module in $modules; do
cd "$(dirname "$module")"
znc-buildmod "$module"
done
# Go back to original directory.
cd "$cwd"
fi
# Create default config if it doesn't exist
if [ ! -f "${DATADIR}/configs/znc.conf" ]; then
mkdir -p "${DATADIR}/configs"
cp /src/znc.conf.default "${DATADIR}/configs/znc.conf"
fi
# Start ZNC.
exec znc --foreground --datadir="$DATADIR" $@

32
znc.conf.default Normal file
View File

@@ -0,0 +1,32 @@
// WARNING
//
// Do NOT edit this file while ZNC is running!
// Use webadmin or *controlpanel instead.
//
// Buf if you feel risky, you might want to read help on /znc saveconfig and /znc rehash.
// Also check http://en.znc.in/wiki/Configuration
Version = 1.0
<Listener l>
Port = 6667
IPv4 = true
IPv6 = true
SSL = false
</Listener>
LoadModule = webadmin
<User admin>
Pass = sha256#0ff9dbecce6e6a60031937e471b4911c3c3b32e9545b7c2868c22152da4f109d#pvcfXcnF/BjsXVU:Z9;-#
Admin = true
Nick = admin
AltNick = admin_
Ident = admin
RealName = Got ZNC?
Buffer = 50
AutoClearChanBuffer = true
ChanModes = +stn
LoadModule = chansaver
LoadModule = controlpanel
LoadModule = perform
</User>