2017
04.29
04.29
Cronの見直しと言うかLet’s Encrypt認証とMastodonの記述
先日、Crontabの配下に
/etc/cron.d/mastodon
を置いて、認証の更新とMastodonのデイリー処理を追加した。以下の感じ
RAILS_ENV=productionMAILTO=root12 3,6 * * * usernamedayo cd /xxxxx/ && docker-compose run –rm web rake mastodon:daily42 3 * * 1 usernamedayo cd /xxxxx/ && docker-compose run –rm web rake mastodon:media:remove_remote12 4 23 * * usernamedayo systemctl stop nginx && /xxxxx/letsencrypt-auto renew –force-renew && systemctl start nginx
1行目は呪文
2行目は処理をrootにメール
3行目、4行目はMastodonの日次処理。
5行目は、Let’s Encryptと言うフリーのSSL認証が1週間で期限切れになってしまうので、それを防ぐために毎週更新処理を自動化するためのもです。
usernamedayoと、xxxxxの部分はご自分の環境で置き換えてください。
コメント
この記事へのトラックバックはありません。
この記事へのコメントはありません。