d8b82b52e0
Daily cron job that dump the database, xz it, sign it with GPG, create a torrent file and seed it with rtorrent.
17 lignes
559 o
Django/Jinja
17 lignes
559 o
Django/Jinja
[Unit]
|
|
Description=rTorrent
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=forking
|
|
KillMode=none
|
|
User={{ ansible_ssh_user }}
|
|
# FIXME Start-pre gives an 'Operation not supported error'
|
|
#ExecStartPre=/usr/bin/bash -c "if test -e %h/.rtorrent_session/rtorrent.lock && test -z `pidof rtorrent`; then rm -f %h/.rtorrent_session/rtorrent.lock; fi"
|
|
ExecStart=/usr/bin/screen -dmfa -S rtorrent /usr/bin/rtorrent
|
|
ExecStop=/usr/bin/bash -c "test `pidof rtorrent` && killall -w -s 2 /usr/bin/rtorrent"
|
|
WorkingDirectory=%h
|
|
Restart=on-failure
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|