Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- chronos@localhost /usr/local $ sudo insmod /usr/local/modules/x86_64_3.8.11/cifs.ko
- insmod: ERROR: could not insert module /usr/local/modules/x86_64_3.8.11/cifs.ko: Invalid parameters
- [del]To automate the process of updating the certificate we need a little script and edit the crontab file.
- [code]vi acme_update.sh[/code]
- And copy the below script in acme_update.sh PS don't forget to press the "i"to enable the insert mode in vi before you paste. To save "esc :wq"
- [code]#!/bin/sh
- d=$(date)
- logfile="/var/log/acme_update.log"
- domain="*.timara.nl"
- update=$(/root/acme.sh --cron --home /root/.acme.sh|grep -o force)
- if [ "$update" == "" ]; then
- # update used certificates
- cp "/root/.acme.sh/$domain/$domain.cer" "/usr/syno/etc/ssl/ssl.crt/server.crt"
- cp "/root/.acme.sh/$domain/$domain.key" "/usr/syno/etc/ssl/ssl.key/server.key"
- # update default certificates
- cp "/root/.acme.sh/$domain/$domain.cer" "/usr/syno/etc/packages/VPNPlusServer/certificate/default_ca.crt"
- cp "/root/.acme.sh/$domain/$domain.key" "/usr/syno/etc/packages/VPNPlusServer/certificate/default_ca.key"
- # restart httpd
- synoservicectl --restart httpd-sys
- mv "$logfile" "$logfile.old"
- echo "$d: lets encrypt $domain certificate updated" >> "$logfile"
- else
- echo "$d: no need to update certificate $domain yet" >> "$logfile"
- fi
- [/code]
- Now make the script executabele:
- [code]chmod a+x acme_update.sh[/code]
- Edit the crontab file and add the last line like the below example so the script will run once a day.
- [code]vi /etc/crontab[/code]
- [code]#minute hour mday month wday who command
- 30 4 * * 3 root /sbin/fstrim /volume1
- 5 10 * * 0,1,2,3,5 root /usr/syno/bin/synopkg chkupgradepkg
- 2 3 * * 5 root /tmp/synoschedtask --run id=2
- 7 18 * * 0 root /usr/syno/bin/synomyds --report_info
- 0 0 * * * root /root/acme_update.sh
- [/code]
- Resart the crond:
- [code]synoservicectl --restart crond[/code]
- The script will create a logfile "/var/log/acme_update.log" This will be moved when the certificate is updated to "/var/log/acme_update.log.old"
- Note: the crontab will probably be replaced by a SRM update didn't test that yet, so it is possible we need to redo this last step after an update.[/del]
Advertisement
Add Comment
Please, Sign In to add comment