镜像自地址
https://github.com/tuna/tunasync.git
已同步 2025-12-05 22:16:47 +00:00
added systemd service files
这个提交包含在:
@@ -3,6 +3,7 @@ tunasync
|
|||||||
|
|
||||||
[](https://travis-ci.org/tuna/tunasync)
|
[](https://travis-ci.org/tuna/tunasync)
|
||||||
[](https://coveralls.io/github/tuna/tunasync?branch=dev)
|
[](https://coveralls.io/github/tuna/tunasync?branch=dev)
|
||||||
|

|
||||||
|
|
||||||
## Design
|
## Design
|
||||||
|
|
||||||
|
|||||||
12
systemd/tunasync-manager.service
普通文件
12
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
systemd/tunasync-worker.service
普通文件
14
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
|
||||||
在新工单中引用
屏蔽一个用户