Last active
October 16, 2016 03:22
-
-
Save atdt/ed3d1404e796e8c965497ca6fe4966e5 to your computer and use it in GitHub Desktop.
ZNC on Jessie
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl req -nodes -newkey rsa:4096 -keyout atdt.pem -x509 -days 3650 -out atdt.pem -subj "/CN=atdt" | |
openssl x509 -sha1 -noout -fingerprint -in atdt.pem | sed -e 's/^.*=//;s/://g;y/ABCDEF/abcdef/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Puppet manifest for setting up ZNC on Debian Jessie | |
# Set $PATH for all Exec resources | |
Exec { | |
path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' | |
} | |
exec { 'apt-get update': | |
refreshonly => true, | |
} | |
group { 'znc': | |
ensure => present, | |
system => true, | |
} | |
user { 'znc': | |
ensure => present, | |
gid => 'znc', | |
shell => '/bin/false', | |
home => '/srv/znc', | |
system => true, | |
managehome => true, | |
} | |
exec { 'add_znc_apt_key': | |
command => 'wget -qO- http://packages.temporal-intelligence.net/repo.gpg.key | apt-key add -', | |
unless => 'apt-key list | grep -q temporal-intelligence.net', | |
} | |
file { '/etc/apt/sources.list.d/znc.list': | |
content => "deb http://packages.temporal-intelligence.net/znc/debian/ jessie main\n", | |
require => Exec['add_znc_apt_key'], | |
notify => Exec['apt-get update'], | |
} | |
package { 'znc': | |
ensure => present, | |
require => Exec['apt-get update'], | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Save this as /lib/systemd/system/znc.service | |
# Then run: | |
# systemctl daemon-reload | |
# systemctl enable znc | |
# systemctl start znc | |
[Unit] | |
Description=ZNC IRC bouncer | |
After=network.target | |
ConditionPathExists=/srv/znc/.znc/configs/znc.conf | |
[Service] | |
User=znc | |
Group=znc | |
WorkingDirectory=/srv/znc | |
ExecStart=/usr/bin/znc --foreground --no-color | |
Restart=always | |
PrivateTmp=yes | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment