mirror of
https://github.com/chenasraf/snpr.git
synced 2026-05-18 01:39:01 +00:00
Adds ssl autoupdate scheduler (#423)
* Adds ssl autoupdate scheduler * Single quotes for the hound
This commit is contained in:
committed by
Bastian Greshake Tzovaras
parent
e811ae80c2
commit
a08ec4e2e4
29
bin/ssl_cert.sh
Executable file
29
bin/ssl_cert.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo 'Cloning dehydrated...'
|
||||
cd /home
|
||||
git clone https://github.com/lukas2511/dehydrated.git
|
||||
cd dehydrated
|
||||
|
||||
cp docs/examples/config config
|
||||
mkdir -p /home/app/snpr/public/.well-known/acme-challenge
|
||||
|
||||
# by default, WELLKNOWN is commented out, so just set the variable
|
||||
echo 'WELLKNOWN=/home/app/snpr/public/.well-known/acme-challenge' >> config
|
||||
|
||||
echo 'opensnp.org www.opensnp.org' > domains.txt
|
||||
echo 'opensnp.net www.opensnp.net' >> domains.txt
|
||||
|
||||
echo 'Starting dehydrated...'
|
||||
|
||||
./dehydrated --cron --accept-terms
|
||||
|
||||
|
||||
echo 'Done, now copying keys'
|
||||
cp /etc/ssl/private/opensnp.org.key /etc/ssl/private/opensnp.org.key.old
|
||||
cp privkey.pem /etc/ssl/private/opensnp.org.key
|
||||
cp /etc/ssl/certs/opensnp.org.crt /etc/ssl/certs/opensnp.org.crt.old
|
||||
cp fullchain.pem /etc/ssl/certs/opensnp.org.crt
|
||||
|
||||
service nginx restart
|
||||
|
||||
@@ -27,6 +27,7 @@ end
|
||||
|
||||
every :day do
|
||||
rake 'papers:update'
|
||||
command '/home/app/snpr/bin/ssl_cert.sh'
|
||||
end
|
||||
|
||||
every :week do
|
||||
|
||||
Reference in New Issue
Block a user