added examples of how you can automate downloading pastes with the command line binary and some systemd service/timer file pairs

This commit is contained in:
booboy 2019-02-02 04:28:04 -06:00
parent fafd8268c0
commit 79a139a0fc
4 changed files with 46 additions and 0 deletions

View file

@ -0,0 +1,13 @@
[Unit]
Description=Pastebin download newest json paste data
[Service]
# user that is running pastebinner
User=booboy
# change WorkingDirectory to directory where pastebinner bin dir is located
WorkingDirectory=/home/booboy/bin/bpmcdevitt_gitlab/pastebinner/bin
# change ExecStart to point to our pastebinner binary and pass in the --json option
ExecStart=/usr/bin/ruby /home/booboy/bin/bpmcdevitt_gitlab/pastebinner/bin/pastebinner --json
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,10 @@
[Unit]
Description=Download new pastebin raw paste data every 1 minute.
[Timer]
OnBootSec=5min
OnCalendar=*:0/1
[Install]
WantedBy=timers.target

View file

@ -0,0 +1,13 @@
[Unit]
Description=Pastebin download newest raw paste data
[Service]
# user that is running pastebinner
User=booboy
# change WorkingDirectory to directory where pastebinner bin dir is located
WorkingDirectory=/home/booboy/bin/bpmcdevitt_gitlab/pastebinner/bin
# change ExecStart to point to our pastebinner binary and pass in the --download option
ExecStart=/usr/bin/ruby /home/booboy/bin/bpmcdevitt_gitlab/pastebinner/bin/pastebinner --download
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,10 @@
[Unit]
Description=Download new pastebin raw paste data every 1 minute.
[Timer]
OnBootSec=5min
OnCalendar=*:0/1
[Install]
WantedBy=timers.target