1
0

Accepting request 832599 from home:hillwood:branches:server:proxy

- Fix shadowsocks-libev-tunnel.service
- Add some systemd profiles

OBS-URL: https://build.opensuse.org/request/show/832599
OBS-URL: https://build.opensuse.org/package/show/server:proxy/shadowsocks-libev?expand=0&rev=43
This commit is contained in:
Hillwood Yang 2020-09-06 11:57:23 +00:00 committed by Git OBS Bridge
parent 03157e3531
commit 6b4bfada4c
8 changed files with 107 additions and 1 deletions

View File

@ -0,0 +1,13 @@
[Unit]
Description=Daemon to start Shadowsocks-libev-client
Wants=network-online.target
After=network.target
[Service]
Type=forking
PIDFile=/var/run/shadowsocks-libev-client@%i.pid
ExecStart=/usr/bin/ss-local -c /etc/shadowsocks/%i.json -f /var/run/shadowsocks-libev-client@%i.pid -u --fast-open
Restart=on-failure
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,13 @@
[Unit]
Description=Daemon to start Shadowsocks-libev-nat
Wants=network-online.target
After=network.target
[Service]
Type=forking
PIDFile=/var/run/shadowsocks-libev-nat@%i.pid
ExecStart=/usr/bin/ss-nat -c /etc/shadowsocks/%i.json -f /var/run/shadowsocks-libev-nat@%i.pid -u --fast-open
Restart=on-failure
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,13 @@
[Unit]
Description=Daemon to start Shadowsocks-libev-redir
Wants=network-online.target
After=network.target
[Service]
Type=forking
PIDFile=/var/run/shadowsocks-libev-redir@%i.pid
ExecStart=/usr/bin/ss-redir -c /etc/shadowsocks/%i.json -f /var/run/shadowsocks-libev-redir@%i.pid -u --fast-open
Restart=on-failure
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,13 @@
[Unit]
Description=Daemon to start Shadowsocks-libev-server
Wants=network-online.target
After=network.target
[Service]
Type=forking
PIDFile=/var/run/shadowsocks-libev-server@%i.pid
ExecStart=/usr/bin/ss-server -c /etc/shadowsocks/%i.json -f /var/run/shadowsocks-libev-server@%i.pid -u --fast-open
Restart=on-failure
[Install]
WantedBy=multi-user.target

View File

@ -5,7 +5,7 @@ After=network.target
[Service] [Service]
Type=forking Type=forking
PIDFile=/var/run/shadowsocks-libev.pid PIDFile=/var/run/shadowsocks-libev-tunnel.pid
ExecStart=/usr/bin/ss-tunnel -c /etc/shadowsocks/shadowsocks-libev-config.json -f /var/run/shadowsocks-libev-tunnel.pid -u --fast-open ExecStart=/usr/bin/ss-tunnel -c /etc/shadowsocks/shadowsocks-libev-config.json -f /var/run/shadowsocks-libev-tunnel.pid -u --fast-open
Restart=on-failure Restart=on-failure

View File

@ -0,0 +1,13 @@
[Unit]
Description=Daemon to start Shadowsocks-libev-tunnel
Wants=network-online.target
After=network.target
[Service]
Type=forking
PIDFile=/var/run/shadowsocks-libev-tunnel@%i.pid
ExecStart=/usr/bin/ss-tunnel -c /etc/shadowsocks/%i.json -f /var/run/shadowsocks-libev-tunnel@%i.pid -u --fast-open
Restart=on-failure
[Install]
WantedBy=multi-user.target

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sun Sep 6 11:35:49 UTC 2020 - Hillwood Yang <hillwood@opensuse.org>
- Fix shadowsocks-libev-tunnel.service
- Add some systemd profiles
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jun 9 16:03:02 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org> Tue Jun 9 16:03:02 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@ -33,6 +33,11 @@ Source4: %{name}-tunnel.service
Source5: %{name}-nat.service Source5: %{name}-nat.service
Source6: %{name}-manager.service Source6: %{name}-manager.service
Source7: %{name}-redir.service Source7: %{name}-redir.service
Source8: %{name}-client@.service
Source9: %{name}-server@.service
Source10: %{name}-tunnel@.service
Source11: %{name}-nat@.service
Source12: %{name}-redir@.service
BuildRequires: libtool BuildRequires: libtool
BuildRequires: mbedtls-devel BuildRequires: mbedtls-devel
BuildRequires: pkgconfig(libcares) BuildRequires: pkgconfig(libcares)
@ -118,6 +123,11 @@ install -m 644 %{SOURCE4} %{buildroot}%{_unitdir}
install -m 644 %{SOURCE5} %{buildroot}%{_unitdir} install -m 644 %{SOURCE5} %{buildroot}%{_unitdir}
install -m 644 %{SOURCE6} %{buildroot}%{_unitdir} install -m 644 %{SOURCE6} %{buildroot}%{_unitdir}
install -m 644 %{SOURCE7} %{buildroot}%{_unitdir} install -m 644 %{SOURCE7} %{buildroot}%{_unitdir}
install -m 644 %{SOURCE8} %{buildroot}%{_unitdir}
install -m 644 %{SOURCE9} %{buildroot}%{_unitdir}
install -m 644 %{SOURCE10} %{buildroot}%{_unitdir}
install -m 644 %{SOURCE11} %{buildroot}%{_unitdir}
install -m 644 %{SOURCE12} %{buildroot}%{_unitdir}
mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_sbindir}
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-client ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-client
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-server ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-server
@ -125,6 +135,11 @@ ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-manager
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-nat ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-nat
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-redir ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-redir
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-tunnel ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-tunnel
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-client@
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-server@
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-nat@
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-redir@
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-tunnel@
%pre %pre
%service_add_pre %{name}-server.service %service_add_pre %{name}-server.service
@ -133,6 +148,11 @@ ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-tunnel
%service_add_pre %{name}-nat.service %service_add_pre %{name}-nat.service
%service_add_pre %{name}-redir.service %service_add_pre %{name}-redir.service
%service_add_pre %{name}-tunnel.service %service_add_pre %{name}-tunnel.service
%service_add_pre %{name}-server@.service
%service_add_pre %{name}-client@.service
%service_add_pre %{name}-nat@.service
%service_add_pre %{name}-redir@.service
%service_add_pre %{name}-tunnel@.service
%post %post
%service_add_post %{name}-server.service %service_add_post %{name}-server.service
@ -141,6 +161,11 @@ ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-tunnel
%service_add_post %{name}-nat.service %service_add_post %{name}-nat.service
%service_add_post %{name}-redir.service %service_add_post %{name}-redir.service
%service_add_post %{name}-tunnel.service %service_add_post %{name}-tunnel.service
%service_add_post %{name}-server@.service
%service_add_post %{name}-client@.service
%service_add_post %{name}-nat@.service
%service_add_post %{name}-redir@.service
%service_add_post %{name}-tunnel@.service
%preun %preun
%service_del_preun %{name}-server.service %service_del_preun %{name}-server.service
@ -149,6 +174,11 @@ ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-tunnel
%service_del_preun %{name}-nat.service %service_del_preun %{name}-nat.service
%service_del_preun %{name}-redir.service %service_del_preun %{name}-redir.service
%service_del_preun %{name}-tunnel.service %service_del_preun %{name}-tunnel.service
%service_del_preun %{name}-server@.service
%service_del_preun %{name}-client@.service
%service_del_preun %{name}-nat@.service
%service_del_preun %{name}-redir@.service
%service_del_preun %{name}-tunnel@.service
%postun %postun
%service_del_postun %{name}-server.service %service_del_postun %{name}-server.service
@ -157,6 +187,11 @@ ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcshadowsocks-libev-tunnel
%service_del_postun %{name}-nat.service %service_del_postun %{name}-nat.service
%service_del_postun %{name}-redir.service %service_del_postun %{name}-redir.service
%service_del_postun %{name}-tunnel.service %service_del_postun %{name}-tunnel.service
%service_del_postun %{name}-server@.service
%service_del_postun %{name}-client@.service
%service_del_postun %{name}-nat@.service
%service_del_postun %{name}-redir@.service
%service_del_postun %{name}-tunnel@.service
%post -n lib%{name}2 -p /sbin/ldconfig %post -n lib%{name}2 -p /sbin/ldconfig