Browse Source
Provides separated service files for RPM packages
Provides separated service files for RPM packages
As discussed with @librehat in #1604, maintaining a separate set of systemd files for RPM distributions will be convenient to build on Copr. This patch will also change some lines in rpm/genrpm.sh to archive the source code using `git archive` because the old logic doesn't respect `.gitignore`.pull/1644/head
Yuxiang Zhu
7 years ago
committed by
Max Lv
11 changed files with 212 additions and 62 deletions
Split View
Diff Options
-
10.gitignore
-
36rpm/SOURCES/0001-systemd-services.patch
-
27rpm/SOURCES/systemd/shadowsocks-libev-local.service
-
27rpm/SOURCES/systemd/shadowsocks-libev-local@.service
-
27rpm/SOURCES/systemd/shadowsocks-libev-redir@.service
-
27rpm/SOURCES/systemd/shadowsocks-libev-server@.service
-
27rpm/SOURCES/systemd/shadowsocks-libev-tunnel@.service
-
25rpm/SOURCES/systemd/shadowsocks-libev.default
-
27rpm/SOURCES/systemd/shadowsocks-libev.service
-
10rpm/SPECS/shadowsocks-libev.spec.in
-
31rpm/genrpm.sh
@ -1,36 +0,0 @@ |
|||
diff -ru shadowsocks-libev-orig/debian/shadowsocks-libev.default shadowsocks-libev/debian/shadowsocks-libev.default
|
|||
--- shadowsocks-libev-orig/debian/shadowsocks-libev.default 2017-06-02 08:45:07.000000000 +0800
|
|||
+++ shadowsocks-libev/debian/shadowsocks-libev.default 2017-06-28 16:39:37.236474413 +0800
|
|||
@@ -19,7 +19,7 @@
|
|||
|
|||
# User and group to run the server as |
|||
USER=nobody |
|||
-GROUP=nogroup
|
|||
+GROUP=nobody
|
|||
|
|||
# Number of maximum file descriptors |
|||
MAXFD=32768 |
|||
diff -ru shadowsocks-libev-orig/debian/shadowsocks-libev.service shadowsocks-libev/debian/shadowsocks-libev.service
|
|||
--- shadowsocks-libev-orig/debian/shadowsocks-libev.service 2017-06-02 08:45:07.000000000 +0800
|
|||
+++ shadowsocks-libev/debian/shadowsocks-libev.service 2017-06-28 17:23:55.131822730 +0800
|
|||
@@ -6,7 +6,7 @@
|
|||
# (at your option) any later version. |
|||
# |
|||
# This file is default for Debian packaging. See also |
|||
-# /etc/default/shadowsocks-libev for environment variables.
|
|||
+# /etc/sysconfig/shadowsocks-libev for environment variables.
|
|||
|
|||
[Unit] |
|||
Description=Shadowsocks-libev Default Server Service |
|||
@@ -15,9 +15,9 @@
|
|||
|
|||
[Service] |
|||
Type=simple |
|||
-EnvironmentFile=/etc/default/shadowsocks-libev
|
|||
+EnvironmentFile=/etc/sysconfig/shadowsocks-libev
|
|||
User=nobody |
|||
-Group=nogroup
|
|||
+Group=nobody
|
|||
LimitNOFILE=32768 |
|||
ExecStart=/usr/bin/ss-server -c $CONFFILE $DAEMON_ARGS |
|||
|
@ -0,0 +1,27 @@ |
|||
# This file is part of shadowsocks-libev. |
|||
# |
|||
# Shadowsocks-libev is free software; you can redistribute it and/or modify |
|||
# it under the terms of the GNU General Public License as published by |
|||
# the Free Software Foundation; either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This file is default for RPM packaging. See also |
|||
# /etc/sysconfig/shadowsocks-libev for environment variables. |
|||
|
|||
[Unit] |
|||
Description=Shadowsocks-libev Default Local Service |
|||
Documentation=man:shadowsocks-libev(8) |
|||
After=network.target |
|||
|
|||
[Service] |
|||
Type=simple |
|||
EnvironmentFile=/etc/sysconfig/shadowsocks-libev |
|||
User=nobody |
|||
Group=nobody |
|||
LimitNOFILE=32768 |
|||
ExecStart=/usr/bin/ss-local -c "$CONFFILE" $DAEMON_ARGS |
|||
CapabilityBoundingSet=CAP_NET_BIND_SERVICE |
|||
|
|||
[Install] |
|||
WantedBy=multi-user.target |
|||
|
@ -0,0 +1,27 @@ |
|||
# This file is part of shadowsocks-libev. |
|||
# |
|||
# Shadowsocks-libev is free software; you can redistribute it and/or modify |
|||
# it under the terms of the GNU General Public License as published by |
|||
# the Free Software Foundation; either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This is a template unit file. Users may copy and rename the file into |
|||
# config directories to make new service instances. See systemd.unit(5) |
|||
# for details. |
|||
|
|||
[Unit] |
|||
Description=Shadowsocks-Libev Custom Client Service for %I |
|||
Documentation=man:ss-local(1) |
|||
After=network.target |
|||
|
|||
[Service] |
|||
Type=simple |
|||
CapabilityBoundingSet=CAP_NET_BIND_SERVICE |
|||
ExecStart=/usr/bin/ss-local -c /etc/shadowsocks-libev/%i.json |
|||
User=nobody |
|||
Group=nobody |
|||
LimitNOFILE=32768 |
|||
|
|||
[Install] |
|||
WantedBy=multi-user.target |
|||
|
@ -0,0 +1,27 @@ |
|||
# This file is part of shadowsocks-libev. |
|||
# |
|||
# Shadowsocks-libev is free software; you can redistribute it and/or modify |
|||
# it under the terms of the GNU General Public License as published by |
|||
# the Free Software Foundation; either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This is a template unit file. Users may copy and rename the file into |
|||
# config directories to make new service instances. See systemd.unit(5) |
|||
# for details. |
|||
|
|||
[Unit] |
|||
Description=Shadowsocks-Libev Custom Client Service Redir Mode for %I |
|||
Documentation=man:ss-redir(1) |
|||
After=network.target |
|||
|
|||
[Service] |
|||
Type=simple |
|||
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE |
|||
ExecStart=/usr/bin/ss-redir -c /etc/shadowsocks-libev/%i.json |
|||
User=nobody |
|||
Group=nobody |
|||
LimitNOFILE=32768 |
|||
|
|||
[Install] |
|||
WantedBy=multi-user.target |
|||
|
@ -0,0 +1,27 @@ |
|||
# This file is part of shadowsocks-libev. |
|||
# |
|||
# Shadowsocks-libev is free software; you can redistribute it and/or modify |
|||
# it under the terms of the GNU General Public License as published by |
|||
# the Free Software Foundation; either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This is a template unit file. Users may copy and rename the file into |
|||
# config directories to make new service instances. See systemd.unit(5) |
|||
# for details. |
|||
|
|||
[Unit] |
|||
Description=Shadowsocks-Libev Custom Server Service for %I |
|||
Documentation=man:ss-server(1) |
|||
After=network.target |
|||
|
|||
[Service] |
|||
Type=simple |
|||
CapabilityBoundingSet=CAP_NET_BIND_SERVICE |
|||
ExecStart=/usr/bin/ss-server -c /etc/shadowsocks-libev/%i.json |
|||
User=nobody |
|||
Group=nobody |
|||
LimitNOFILE=32768 |
|||
|
|||
[Install] |
|||
WantedBy=multi-user.target |
|||
|
@ -0,0 +1,27 @@ |
|||
# This file is part of shadowsocks-libev. |
|||
# |
|||
# Shadowsocks-libev is free software; you can redistribute it and/or modify |
|||
# it under the terms of the GNU General Public License as published by |
|||
# the Free Software Foundation; either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This is a template unit file. Users may copy and rename the file into |
|||
# config directories to make new service instances. See systemd.unit(5) |
|||
# for details. |
|||
|
|||
[Unit] |
|||
Description=Shadowsocks-Libev Custom Client Service Tunnel Mode for %I |
|||
Documentation=man:ss-tunnel(1) |
|||
After=network.target |
|||
|
|||
[Service] |
|||
Type=simple |
|||
CapabilityBoundingSet=CAP_NET_BIND_SERVICE |
|||
ExecStart=/usr/bin/ss-tunnel -c /etc/shadowsocks-libev/%i.json |
|||
User=nobody |
|||
Group=nobody |
|||
LimitNOFILE=32768 |
|||
|
|||
[Install] |
|||
WantedBy=multi-user.target |
|||
|
@ -0,0 +1,25 @@ |
|||
# Defaults for shadowsocks initscript |
|||
# sourced by /etc/init.d/shadowsocks-libev |
|||
# installed at /etc/default/shadowsocks-libev by the maintainer scripts |
|||
|
|||
# |
|||
# This is a POSIX shell fragment |
|||
# |
|||
# Note: `START', `GROUP' and `MAXFD' options are not recognized by systemd. |
|||
# Please change those settings in the corresponding systemd unit file. |
|||
|
|||
# Enable during startup? |
|||
START=yes |
|||
|
|||
# Configuration file |
|||
CONFFILE="/etc/shadowsocks-libev/config.json" |
|||
|
|||
# Extra command line arguments |
|||
DAEMON_ARGS="-u" |
|||
|
|||
# User and group to run the server as |
|||
USER=nobody |
|||
GROUP=nobody |
|||
|
|||
# Number of maximum file descriptors |
|||
MAXFD=32768 |
@ -0,0 +1,27 @@ |
|||
# This file is part of shadowsocks-libev. |
|||
# |
|||
# Shadowsocks-libev is free software; you can redistribute it and/or modify |
|||
# it under the terms of the GNU General Public License as published by |
|||
# the Free Software Foundation; either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This file is default for RPM packaging. See also |
|||
# /etc/sysconfig/shadowsocks-libev for environment variables. |
|||
|
|||
[Unit] |
|||
Description=Shadowsocks-libev Default Server Service |
|||
Documentation=man:shadowsocks-libev(8) |
|||
After=network.target |
|||
|
|||
[Service] |
|||
Type=simple |
|||
EnvironmentFile=/etc/sysconfig/shadowsocks-libev |
|||
User=nobody |
|||
Group=nobody |
|||
LimitNOFILE=32768 |
|||
ExecStart=/usr/bin/ss-server -c "$CONFFILE" $DAEMON_ARGS |
|||
CapabilityBoundingSet=CAP_NET_BIND_SERVICE |
|||
|
|||
[Install] |
|||
WantedBy=multi-user.target |
|||
|
Write
Preview
Loading…
Cancel
Save