diff --git a/Synology-NAS-Guide.md b/Synology-NAS-Guide.md index e1d0182..2d6d5a7 100644 --- a/Synology-NAS-Guide.md +++ b/Synology-NAS-Guide.md @@ -54,12 +54,12 @@ To auto renew the certificates in the future, you need to configure the cronjob. Configure crontab for root -`$ vi /etc/crontab ` + $ vi /etc/crontab Add the following line to the crontab. Remember to use tab for spacing. For example, 10:00 am of the 2nd day every month run the cronjob to check if due to renew the certificates (You can modify the cronjob schedule according to your needs) -`0 10 2 * * root /usr/local/sbin/acme.sh/acme.sh --cron --home /usr/local/sbin/acme.sh/` + 0 10 2 * * root /usr/local/sbin/acme.sh/acme.sh --cron --home /usr/local/sbin/acme.sh/ The last step is to setup a schedule task to copy renewed certificates in cert library to system default directory and restart the Nginx service. @@ -69,18 +69,19 @@ In DSM control panel, open the 'Task Scheduler' and create a new scheduled task * Schedule: Setup the time according to your acme.sh crontab schedule. For example, 11:00 am of the 2nd day every month. * Task setting: User-defined-script -`rsync -avzh /usr/syno/etc/certificate/_archive/**vPATH**/ /usr/syno/etc/certificate/system/default/` + rsync -avzh /usr/syno/etc/certificate/_archive/**vPATH**/ /usr/syno/etc/certificate/system/default/` -`/usr/syno/etc/rc.sysv/nginx.sh reload ` + /usr/syno/etc/rc.sysv/nginx.sh reload Now you should all good. -------------------------------------------------------------------------------------------------------------------- To fix the broken environment after Synology DSM upgrade, you can -``` -$ cd /urs/local/sbin/acme.sh -$ ./acme.sh --upgrade --nocron --home /usr/local/sbin/acme.sh -``` + + $ cd /urs/local/sbin/acme.sh + $ ./acme.sh --upgrade --nocron --home /usr/local/sbin/acme.sh + or manually add below line into /root/.profile -`. "/usr/local/sbin/acme.sh/acme.sh.env"` \ No newline at end of file + + . "/usr/local/sbin/acme.sh/acme.sh.env" \ No newline at end of file