added systemd service files

This commit is contained in:
bigeagle 2016-05-02 19:04:21 +08:00
parent f768b48d72
commit dbc96b475a
No known key found for this signature in database
GPG Key ID: 9171A4571C27920A
3 changed files with 27 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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