Last active
January 25, 2021 05:49
-
-
Save saoud/7a1adad895a95ba8513a2256c8f06664 to your computer and use it in GitHub Desktop.
znc automated install
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
#! /usr/bin/env bash | |
set -e | |
# Config | |
ZNC_VERSION="1.8.2" | |
# Ensure package list is up to date. | |
apt update | |
# Install runtime dependencies. | |
apt install -y sudo | |
# Install build dependencies. | |
apt install -y wget build-essential libssl-dev libperl-dev pkg-config | |
# Prepare building | |
mkdir -p /src | |
# Download, compile and install ZNC. | |
cd /src | |
wget "http://znc.in/releases/archive/znc-${ZNC_VERSION}.tar.gz" | |
tar -zxf "znc-${ZNC_VERSION}.tar.gz" | |
cd "znc-${ZNC_VERSION}" | |
mkdir build && cd build/ && cmake .. && make && make install | |
# Clean up | |
apt-get remove -y wget | |
apt-get autoremove -y | |
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment