Selaa lähdekoodia

added systemd service files

bigeagle 9 vuotta sitten
vanhempi
sitoutus
dbc96b475a
3 muutettua tiedostoa jossa 27 lisäystä ja 0 poistoa
  1. 1 0
      README.md
  2. 12 0
      systemd/tunasync-manager.service
  3. 14 0
      systemd/tunasync-worker.service

+ 1 - 0
README.md

@@ -3,6 +3,7 @@ tunasync
 
 [![Build Status](https://travis-ci.org/tuna/tunasync.svg?branch=dev)](https://travis-ci.org/tuna/tunasync)
 [![Coverage Status](https://coveralls.io/repos/github/tuna/tunasync/badge.svg?branch=dev)](https://coveralls.io/github/tuna/tunasync?branch=dev)
+![GPLv3](https://img.shields.io/badge/license-GPLv3-blue.svg)
 
 ## Design
 

+ 12 - 0
systemd/tunasync-manager.service

@@ -0,0 +1,12 @@
+[Unit]
+Description = TUNA mirrors sync manager
+After=network.target
+Requires=network.target
+
+[Service]
+Type=simple
+User=tunasync
+ExecStart = /home/bin/tunasync manager -c /etc/tunasync/manager.conf --with-systemd
+
+[Install]
+WantedBy=multi-user.target

+ 14 - 0
systemd/tunasync-worker.service

@@ -0,0 +1,14 @@
+[Unit]
+Description = TUNA mirrors sync worker
+After=network.target
+
+[Service]
+Type=simple
+User=tunasync
+PermissionsStartOnly=true
+ExecStartPre=/usr/bin/cgcreate -t tunasync -a tunasync -g cpu:tunasync
+ExecStart=/home/bin/tunasync worker -c /etc/tunasync/worker.conf --with-systemd
+ExecStopPost=/usr/bin/cgdelete cpu:tunasync
+
+[Install]
+WantedBy=multi-user.target