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:
parent
fafd8268c0
commit
79a139a0fc
4 changed files with 46 additions and 0 deletions
|
@ -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
|
|
@ -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
|
||||
|
13
lib/examples/systemd/pastebinner_download_raw_paste.service
Normal file
13
lib/examples/systemd/pastebinner_download_raw_paste.service
Normal 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
|
10
lib/examples/systemd/pastebinner_download_raw_paste.timer
Normal file
10
lib/examples/systemd/pastebinner_download_raw_paste.timer
Normal 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
|
||||
|
Loading…
Add table
Reference in a new issue