vcmp timer task
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Nocturnal Video compression
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/scripts/bin/vcmp -s /mnt/nocturnal/local/downloads/ -d /mnt/nocturnal/share/downloads/ -n 20
|
||||
Type=oneshot
|
||||
RemainAfterExit=no
|
||||
TimeoutStartSec=0
|
||||
IOSchedulingClass=idle
|
||||
CPUSchedulingPolicy=idle
|
||||
CPUSchedulingPriority=0
|
||||
RestrictRealtime=yes
|
||||
Restart=no
|
||||
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Nocturnal vcmp timer
|
||||
|
||||
[Timer]
|
||||
OnBootSec=5min
|
||||
OnUnitActiveSec=5min
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,15 @@
|
||||
- name: Copy vcmp service files
|
||||
copy:
|
||||
src: "{{ item }}"
|
||||
dest: /etc/systemd/system/
|
||||
mode: 0644
|
||||
with_items:
|
||||
- vcmp/vcmp.service
|
||||
- vcmp/vcmp.timer
|
||||
|
||||
- name: Enable vcmp timer
|
||||
systemd:
|
||||
name: vcmp.timer
|
||||
enabled: yes
|
||||
state: started
|
||||
daemon_reload: yes
|
||||
Reference in New Issue
Block a user