mirror of
https://github.com/chenasraf/snpr.git
synced 2026-05-17 17:38:07 +00:00
Fixes bug in autoupdater. Reschedules update to 60 days. (#424)
* Fixes bug in autoupdater. Reschedules update to 60 days. * Implements Helges suggestion of a specific release so future updates to dehydrated do not break stuff
This commit is contained in:
committed by
Bastian Greshake Tzovaras
parent
a08ec4e2e4
commit
31840c9d05
@@ -2,7 +2,7 @@
|
||||
|
||||
echo 'Cloning dehydrated...'
|
||||
cd /home
|
||||
git clone https://github.com/lukas2511/dehydrated.git
|
||||
git clone https://github.com/lukas2511/dehydrated.git --branch=v0.4.0 --depth=1
|
||||
cd dehydrated
|
||||
|
||||
cp docs/examples/config config
|
||||
@@ -12,7 +12,6 @@ mkdir -p /home/app/snpr/public/.well-known/acme-challenge
|
||||
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...'
|
||||
|
||||
@@ -21,9 +20,9 @@ echo 'Starting dehydrated...'
|
||||
|
||||
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 /home/dehydrated/certs/opensnp.org/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
|
||||
cp /home/dehydrated/certs/opensnp.org/fullchain.pem /etc/ssl/certs/opensnp.org.crt
|
||||
|
||||
service nginx restart
|
||||
|
||||
|
||||
@@ -27,9 +27,14 @@ end
|
||||
|
||||
every :day do
|
||||
rake 'papers:update'
|
||||
command '/home/app/snpr/bin/ssl_cert.sh'
|
||||
end
|
||||
|
||||
every :week do
|
||||
rake 'recommender:update_all'
|
||||
end
|
||||
|
||||
# The let's encrypt updater stops if the cert is younger than 30 days.
|
||||
# it's valid for 90 days, so let's ask for the middle.
|
||||
every 60.days do
|
||||
command '/home/app/snpr/bin/ssl_cert.sh'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user