Skip to content

Instantly share code, notes, and snippets.

View dirtycajunrice's full-sized avatar
🏠
Working from home

Nicholas St. Germain dirtycajunrice

🏠
Working from home
View GitHub Profile
@dirtycajunrice
dirtycajunrice / plex.conf
Last active July 14, 2022 14:35
Plex-Apache-Reverse-Proxy
# requires a2enmod proxy proxy_http proxy_wstunnel rewrite ssl
<VirtualHost *:80>
ServerName plex.domain.tld
ServerAlias plex.domain2.tld
Redirect / https://plex.domain.tld
</VirtualHost>
<VirtualHost *:443>
def userexistcheck(username):
connection = sqlite3.connect(DB_REL_PATH)
c_db = connection.cursor()
c_db.execute("SELECT ? FROM users", (username,))
user = c_db.fetchone()
connection.close()
if user:
user_exist = True
else:
user_exist = False
PlexShowSilencer/
├── config.ini
├── LICENSE
├── plexshowsilencer
│   ├── config.py
│   ├── dbcreate.py
│   ├── dbpopulate.py
│   ├── __init__.py
│   ├── plexauth.py
│   ├── __pycache__
#!/bin/bash
# Check if ran by root
if [[ $UID -ne 0 ]]; then
echo 'Script must be run as root'
exit
fi
# sqlite3 database query to pull list of shows from sickbeard.db
sqlite3 /opt/SickRage/sickbeard.db "SELECT show_name, status FROM tv_shows" | sort > /tmp/shows.list
while [[ ! $extip ]]; do
extip=$(curl -s http://checkip.amazonaws.com/)
done
whiptail --title Complete --msgbox \ "Check that everything has been set up correctly by going to:
Internal IP: http://$(ifconfig | grep 'inet end.' | cut -d ':' -f 2 | awk '{ print $1 }' | \
grep -E '^(192\.168|10\.|172\.1[6-9]\.|172\.2[0-9]\.|172\.3[01]\.)'):8081
OR
External IP: http://$extip:8081
while [[ ! $extip ]]; do
extip=$(curl -s http://checkip.amazonaws.com/)
done
whiptail --title Complete --msgbox \ "Check that everything has been set up correctly by going to:
Internal IP: http://$(ip a | awk '/inet / {sub(/\/.*/, "", $2); print $2}' | sed '/^127/d' | head -n1):8081
OR
External IP: http://$extip:8081
<VirtualHost *:80>
ServerName sicktest.dirtycajunrice.com
Redirect / http://dirtycajunrice.com:8081/
</VirtualHost>