Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/sh
# This script automates the setup ssl cert and key on Tomato router to use JFFS
# Based on Tutorial: Use SSL certificate for WAN admin @http://tomatousb.org/tut:use-ssl-certificate-for-wan-admin
# Requires default `certpem` and `key.pem` present at /jffs/ssl/
rm /etc/cert.pem
rm /etc/key.pem
ln -s /jffs/ssl/cert.pem /etc/cert.pem
ln -s /jffs/ssl/key.pem /etc/key.pem
tar -C / -czf /tmp/cert.tgz etc/cert.pem etc/key.pem
nvram setfb64 https_crt_file /tmp/cert.tgz
nvram commit
service httpd restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment