Created
October 1, 2016 06:56
-
-
Save auyongcheemeng/d38ea6da2bfb5d53e8657853d05ffbd8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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