Skip to content

Instantly share code, notes, and snippets.

@t413
t413 / update.sh
Created July 23, 2016 00:11
manage a OpenWRT LetsEncrypt https instalation
#!/usr/bin/env sh
## update.sh - manage a OpenWRT LetsEncrypt https instalation
# HOWTO:
# - put update.sh in its own directory (like /root/.https)
# - run ./update.sh your.domain.com (that domain needs to point to your router)
# * this get an issued cert from letsencrypt.org using the webroot verification method
# * also installs curl and ca-certificates packages
# - use crontab -e; add the line `0 0 * * * "/root/.https/update.sh" >>/root/.https/log.txt 2>&`
# * this runs the update every day, logging everything to log.txt
#
@ruzickap
ruzickap / openwrt_lighttpd.sh
Last active March 5, 2019 21:19
OpenWrt Lighttpd modification to use https and serve transmission, foris, and personal web pages
opkg install lighttpd-mod-proxy
#See the http://192.168.1.1/myadmin/ for main "myadmin" page
mkdir -p /www3/myadmin/transmission-web
mkdir -p /www3/myadmin/luci
cp /etc/foris/foris-lighttpd-inc.conf /etc/foris/foris-lighttpd-inc.conf.orig
cp /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.orig
#Let foris "listen" only on 192.168.1.1
#sed -i "s@\$HTTP\[\"url\"\] !~ \"\^/static\" {.*@\$HTTP\[\"host\"\] == \"192\\.168\\.1\\.1\" {@" /etc/foris/foris-lighttpd-inc.conf