Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jun 2025 09:36:15 +0900
From:      iscream@nugae.org
To:        freebsd-users-jp@freebsd.org
Subject:   Re: /etc/crontab =?UTF-8?B?44Gu57eo6ZuG5pa55rOV?=
Message-ID:  <20250626093615.9CE7.B142C0B6@nugae.org>
In-Reply-To: <CALDx8qVmtpjFNOQCCZxLi5Sg4581cKayixaxfP_KaiAAJgdNOw@mail.gmail.com>
References:  <CALDx8qVmtpjFNOQCCZxLi5Sg4581cKayixaxfP_KaiAAJgdNOw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

こんにちは
西村です

(昨日9時ごろに送っていたのですが、直メールになってたようなので、再度ML送っておきます
MLのreply-to消えてます?)

/usr/local/etc/cron.d/*.conf

においておけば読み取ってくれます
/etc/cron.d/もありますが、お作法的には、/usr/local/~の方ではないでしょうか?
システムメンテナンス系は↑にいれるのが良いのでは無いかと。
/etc/crontabは特段の理由がない限りもう触らない方が宜しいかと

なお、 /usr/local/etc/newsyslog.conf.d/ /usr/local/etc/syslog.d/ 
/usr/local/etc/periodic/ /usr/local/etc/rc.conf.d/ なんかも効くようになってますね

ユーザー固有のプライベートな物は、たけふさんが仰るとおり
crontab -eで編集するのが宜しいかと思います

文字化けというより、htmlになってしまっているだけだと思いますので
考えられるのは、certbot がplaintextからhtmlを吐くように変わった
メーラーがhtmlらしき物が有った場合htmlとしてパースしていたものが
content-typeを厳密に解釈するようになってplaintextとして表示されるようになった
等では無いでしょうか?
certbot見た限りhtml出力では内容ですので、html化しているのは別のソフトのような気がします…

On Wed, 25 Jun 2025 06:35:37 +0900
Yoshito Takeuchi <kinchan@kinchan.com> wrote:

> 竹内と申します。
> 毎日のシステムチェックなどをしてくれている
> /etc/crontab
> を編集したいのですが直接これを編集してよいのでしょうか?
> /usr/local/etc/crontab とかあるのか調べたのですが分かりませんでした。
> 
> こうする理由ですが、なにかをきっかけに cron 実行後、その内容が
> メールされますが、内容が文字化けするようになってしまいました。
> 例えば今まで
> 
> 33 3 * * * /usr/local/bin/certbot renew --max-log-backups 20
> 
> 1行の cron を動かしてうまくいっていたのですが、ある日を境に実行後のメール内容が
> 
> Saving debug log to /var/log/letsencrypt/letsencrypt.log<br /><br />-
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - -=<br /> - -<br />Processing
> /usr/local/etc/letsencrypt/renewal/kinchan.com.conf<br />- - - - - - -
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -=<br /> -
> -<br />Certificate not yet due for renewal<br /><br />- - - - - - - -
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -=<br /> -
> -<br />The following certificates are not due for renewal yet:<br />
> /usr/local/etc/letsencrypt/live/kinchan.com/fullchain.pem expires on
> =<br />2025-08-01 (skipped)<br />No renewals were attempted.<br />- -
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> -=<br /> - -<br />
> 
> のような文字化け?をおこすようになりました。ググった結果
> SHELL=/usr/local/bin/bash
> MAILTO=example@example.com
> 
> # 例: UTF-8を指定する場合
> LANG=ja_JP.UTF-8
> LC_ALL=ja_JP.UTF-8
> を追加することで解決したように思います。
> そこで /etc/crontab にも同じようにしようと思ったのですが、/etc/crontab を直接編集してもよいのか疑問となり本質問メールとなりました。
> ご教示、ご指南頂けると幸いです。
> 失礼します。


-- 
NISHIMURA Yutaka <iscream@nugae.org>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20250626093615.9CE7.B142C0B6>