From f7084ef58f07724403fa776f338674f81fdc7668 Mon Sep 17 00:00:00 2001 From: Craig Stewart Date: Tue, 12 Jun 2018 11:16:57 +0100 Subject: [PATCH] make cron entry easier to read --- guides/building-a-git-repo/finalising.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guides/building-a-git-repo/finalising.html b/guides/building-a-git-repo/finalising.html index 41fde73..a9545da 100644 --- a/guides/building-a-git-repo/finalising.html +++ b/guides/building-a-git-repo/finalising.html @@ -110,8 +110,8 @@ sudo service fail2ban restart

We should now have a working git server. If you set up an Admin user when configuring gitea in the previous steps then we are set. If not you should register a user now, as the first registered user will become admin. The only remaining step before our server is ready is to automate the renewal of our SSL certificate.

sudo crontab -e

This will create an empty crontab for root, and open it in the default editor. As an invalid crontab will stop cron from working properly this command will validate what you save before installing it to cron. You will need to add a line like the below to the end of the file and save it.

-
21 05 * * * /usr/bin/certbot renew --manual-auth-hook /root/certbot/auth.sh --manual-cleanup-hook /root/certbot/clean.sh --renew-hook /root/certbot/renew.sh --manual-public-ip-logging-ok --quiet
-

This will run the certbot command at 05:21 every day, which will check the expiry of your certificate, and renew it and restart apache if it is about to expire. Feel free to change the time it runs, Lets Encrypt won't want everyone trying to get certificates at the same time.

+

"21 05 * * * /usr/bin/certbot renew --manual-auth-hook /root/certbot/auth.sh --manual-cleanup-hook /root/certbot/clean.sh --renew-hook /root/certbot/renew.sh --manual-public-ip-logging-ok --quiet"

+

This will need to be on a single line without the quotes, and will run the certbot command at 05:21 every day, which will check the expiry of your certificate, and renew it and restart apache if it is about to expire. Feel free to change the time it runs, Lets Encrypt won't want everyone trying to get certificates at the same time.

Once that is done your Git Server is ready to use.

Installing Gitea|Main Page|Other Considerations