Skip to content

Instantly share code, notes, and snippets.

@rcguy
rcguy / rTorrent_ruTorrent_v3.sh
Last active Aug 24, 2021
Install and setup: new rtorrent user, apache2, php5, XMLRPC, rTorrent, Libtorrent, ruTorrent.Tested on: Ubuntu Server 14.10 x64 / 4 Cores / 4GB RAM / 20 GB SSD / VPS
View rTorrent_ruTorrent_v3.sh
#!/bin/bash
# Install and setup: new rtorrent user, apache2, XMLRPC, rTorrent, Libtorrent, ruTorrent.
# Tested on: Ubuntu Server 14.10 x64 / 4 Cores / 4GB RAM / 20 GB SSD
# ==> VARIABLES <==
# Software Versions
LIBTORRENT_VER="0.13.6"
RTORRENT_VER="0.9.6"
RUTORRENT_VER="3.7"
RUTORRENT_PLUGINS_VER="3.6"
@rcguy
rcguy / LAMP_phpMyAdmin.sh
Last active Nov 21, 2018
Installs LAMP and phpMyAdmin
View LAMP_phpMyAdmin.sh
#!/bin/bash
# Installs LAMP and phpmyadmin on Ubuntu 14.10
# Tested on: Ubuntu Server 14.10 - x64 + x86 / 2 Cores / 2GB RAM / 20 GB SSD / VPS
# ==> MAIN PROGRAM <==
set -e
# mysql variables
MYSQL_ROOT_PASS="root"
View deluge_install.sh
#!/bin/bash
# Installs deluge daemon + webui and systemd start scripts
# Tested on: Ubuntu Server 16.04.1 x64 / 4 Cores / 4GB RAM / 20 GB SSD
USER="rcguy"
# update the system first
sudo apt update && sudo apt upgrade -y
# add the deluge ppa so we get the most recent version
sudo add-apt-repository ppa:deluge-team/ppa
@rcguy
rcguy / rtorrent.sh
Last active Aug 14, 2018
a simple bash script to compile and build .deb packages for xmlrpc-c, libtorrent, and rtorrent
View rtorrent.sh
#!/bin/bash
# ==> VARIABLES <==
# Software Versions
LIBTORRENT_VER="0.13.6"
RTORRENT_VER="0.9.6"
XMLRPC_VER="1.39.12"
PKG_RELEASE="3"
PREFIX="/usr"
View nginx-min.sh
#!/bin/bash
# Dependencies
# * checkinstall: package the .deb
# * libpcre3, libpcre3-dev: required for HTTP rewrite module
# * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module
# vars
OPENSSL_VER="1.1.0c"
NGINX_VER="1.11.8"
@rcguy
rcguy / vnstati.html
Created Aug 14, 2018
A simple webpage to show vnStati images
View vnstati.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>vnStati</title>
<link rel="shortcut icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAM1BMVEUAAAAABTMAAzMAADMAAzMAAzMAADEABTIAAzQAAzMAADMAAzMAADcAADAAACQAAzMAAAD4qojgAAAAD3RSTlMAN7kP8MgqOGPnGeAcIAcMvjsxAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAN1wAADdcBQiibeAAAAAd0SU1FB+IIDgUPHjyrz5wAAADASURBVFjD7dbZCsQgDIVhu9pt2vd/2ynacbokkJxAr5LLwP8hiGAIxFR1EyxTtVtnEfZ+swipNwhHDwulB4VTDwmXHhBuvVp49EqB6FUC2SsEphcLbC8V+vibIWdjWcRJdRUhZmDWVQ44IAKWT5oVBua8jQ444MB7wJof7gID9DjgAA5M/2/OmIGhLHoJ0HTsz6utREdgBWHPCuKeERQ9Kah6QlD2D0Hd3wSgvwhQfxLAvghwfwiGPgmmfhdqsv8CjMksPRWDjloAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTgtMDgtMTRUMDU6MTU6MzArMDI6MDCHAotxAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE4LTA4LTE0VDA1OjE1OjMwKzAyOjAw9l8zzQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAASUVORK
View rtorrent.service
[Unit]
Description=rTorrent Daemon
After=network.target
[Service]
Type=forking
KillMode=none
User=username
Group=username
ExecStartPre=-/bin/rm -f /home/username/.rtorrent/session/rtorrent.lock
View nginx.service
# Stop dance for nginx
# =======================
#
# ExecStop sends SIGSTOP (graceful stop) to the nginx process.
# If, after 5s (--retry QUIT/5) nginx is still running, systemd takes control
# and sends SIGTERM (fast shutdown) to the main process.
# After another 5s (TimeoutStopSec=5), and if nginx is alive, systemd sends
# SIGKILL to all the remaining processes in the process group (KillMode=mixed).
#
# nginx signals reference doc:
View irssi.service
[Unit]
Description=irssi daemon
After=network.target
[Service]
Type=forking
User=%i
ExecStart=/usr/bin/screen -dmS autodl irssi
ExecStop=/usr/bin/screen -S autodl -X stuff '/quit\n'
WorkingDirectory=%h
@rcguy
rcguy / webmin.sh
Last active Jan 15, 2017
Non-Interactive Script that adds the Webmin apt repository then installs Webmin and dependencies
View webmin.sh
#!/bin/bash
# Adds the Webmin apt repository then installs Webmin and dependencies
# Tested on: Ubuntu Server 14.10 - x64 + x86 / 2 Cores / 2GB RAM / 20 GB SSD / VPS
# ==> MAIN PROGRAM <==
set -e
cat >>/etc/apt/sources.list.d/webmin.list <<EOF
# webmin
deb http://download.webmin.com/download/repository sarge contrib
EOF