neige d'aoust

knowledge, art, and other stuff

User Tools

Site Tools


fedibot

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
fedibot [2025/02/13 16:30] Yukifedibot [2025/02/13 16:37] (current) Yuki
Line 9: Line 9:
 ===== 2. Write the shell script ===== ===== 2. Write the shell script =====
  
-Create an account to the desired instance, then login to that account with toot.+Create an account to the desired instance, then login to that account with toot. Make sure you do this with the user account the cron job is going to run as.
  
 <code bash ~/bin/dugbot> <code bash ~/bin/dugbot>
Line 26: Line 26:
 [Service] [Service]
 Type=oneshot Type=oneshot
-ExecStart=/home/juju/bin/dugbot +ExecStart=/home/yuki/bin/dugbot 
-User=juju+User=yuki
 </code> </code>
 +
 +Make sure to point ''ExecStart'' to the path of your script, and ''User'' to the user account you used to login to your bot account with ''toot''.
  
 <code ini /etc/systemd/system/dugbot.timer> <code ini /etc/systemd/system/dugbot.timer>
Line 40: Line 42:
 WantedBy=timers.target WantedBy=timers.target
 </code> </code>
 +
 +The .timer file should have the same file name as the corresponding .service.
  
 Enable the timer: Enable the timer:
fedibot.1739482209.txt.gz · Last modified: 2025/02/13 16:30 by Yuki