403
回編集
(→クライアント) |
|||
$ curl https://SERVER/ip/
</nowiki>
==== systemd timer ====▼
~/.config/systemd/user/ip-addr.service
<nowiki>
[Unit]
Description=IP address
[Service]
Type=oneshot
ExecStart=curl -s https://SERVER/ip/ | mail -s "IP" MAIL
</nowiki>
~/.config/systemd/user/ip-addr.timer
<nowiki>
[Unit]
Description=IP address
[Timer]
OnCalendar=daily
AccuracySec=1h
Persistent=true
[Install]
WantedBy=timers.target
</nowiki>
==== cron ====
<nowiki>
0 6 * * * curl -s https://SERVER/ip/ | mail -s "IP" MAIL
</nowiki>
▲systemd timer
|