Skip to content

Instantly share code, notes, and snippets.

@concatime
Last active January 19, 2018 20:19
Show Gist options
  • Save concatime/19567a1694dfdc52ceb2e0e022ea9a88 to your computer and use it in GitHub Desktop.
Save concatime/19567a1694dfdc52ceb2e0e022ea9a88 to your computer and use it in GitHub Desktop.
#
# The script will ask you some questions when rendering the private key.
#
OPENSSL=openssl-1.1.0g
CFLAGS+=-pipe
MAKEFLAGS+=-j`nproc`
CPATH=/opt/openssl/include
LIBRARY_PATH=/opt/openssl/lib
export CFLAGS MAKEFLAGS LIBRARY_PATH CPATH
set -e
sudo apt update
gcc || {
sudo apt-get install gcc-5 --no-install-recommends --yes
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1
}
sudo apt-get install wget autoconf automake libtool libconfig-dev libprotobuf-c-dev --yes --no-install-recommends
pushd $(mktemp --directory)
curl https://www.openssl.org/source/$OPENSSL.tar.gz | tar xz
pushd openssl-*
./config --prefix=/opt/openssl --openssldir=/opt/ssl
make
sudo make install
popd
curl https://codeload.github.com/umurmur/umurmur/legacy.tar.gz/master | tar xz
pushd umurmur-*
./autogen.sh
./configure --with-ssl=openssl
make
sudo make install
popd
rm -fR `pwd`
popd
wget https://gist.githubusercontent.com/concatime/19567a1694dfdc52ceb2e0e022ea9a88/raw/umurmur.service --directory-prefix /lib/systemd/system
wget https://gist.githubusercontent.com/concatime/19567a1694dfdc52ceb2e0e022ea9a88/raw/umurmur.conf --directory-prefix /etc
sudo adduser --system --no-create-home --disabled-login --disabled-password umurmur
echo '/opt/openssl/lib' | sudo dd of=/etc/ld.so.conf.d/openssl.conf
sudo ldconfig
pushd /var/log
sudo touch umurmur.log
sudo chown umurmur umurmur.log
sudo chmod 260 umurmur.log
popd
sudo mkdir /etc/umurmur
pushd $_
sudo /opt/openssl/bin/openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout private_key.key -out certificate.crt
popd
sudo systemctl enable umurmur
sudo systemctl start umurmur
echo …done
max_bandwidth = 100800
welcometext = "Welcome, and Make Yourself at Home!"
password = ""
admin_password = ""
opus_threshold = 0
max_users = 10
logfile = "/var/log/umurmur.log"
username = "nobody"
groupname = "www-data"
channels = ( {
name = "Root"
parent = ""
description = "Root channel. No entry."
noenter = true
}, {
name = "Lobby"
parent = "Root"
description = "Lobby channel"
}, {
name = "Games"
parent = "Root"
description = "Channel for gaming"
}, {
name = "League of Legends"
parent = "Games"
}, {
name = "Rainbow Six Siege"
parent = "Games"
}, {
name = "Silent"
parent = "Root"
description = "Silent channel"
silent = true
position = -1
} );
default_channel = "Silent"
[Unit]
Description=μMurmur ~ Mumble’s server
After=network.target
[Service]
PIDFile = /run/umurmur.pid
ExecStartPre = /usr/local/bin/umurmurd -t
ExecStart = /usr/local/bin/umurmurd -p /run/umurmur.pid
ExecReload = /bin/kill -s HUP $MAINPID
[Install]
WantedBy=multi-user.target
@concatime
Copy link
Author

concatime commented May 31, 2017

Needing help to finish this f*cking script.

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment