diff --git a/vtun.service b/vtun.service index d872e6f..d26d83c 100644 --- a/vtun.service +++ b/vtun.service @@ -1,7 +1,12 @@ [Unit] Description=Virtual Tunnels over TCP/IP networks -After=local-fs.target +After=syslog.target network.target [Service] -ExecStart=/usr/sbin/vtund -i -StandardInput=socket +EnvironmentFile=/etc/sysconfig/vtun +ExecStart=/usr/sbin/vtund -n $OPTIONS +ExecReload=/usr/bin/kill -HUP $MAINPID +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/vtun.socket b/vtun.socket index 0dd22f9..07f9d3d 100644 --- a/vtun.socket +++ b/vtun.socket @@ -3,7 +3,6 @@ Description=Vtun Activation Socket [Socket] ListenStream=5000 -Accept=true [Install] WantedBy=sockets.target diff --git a/vtun.spec b/vtun.spec index fef8ae9..102d8c3 100644 --- a/vtun.spec +++ b/vtun.spec @@ -1,6 +1,6 @@ Name: vtun Version: 3.0.3 -Release: 8%{?dist} +Release: 11%{?dist} Summary: Virtual tunnel over TCP/IP networks License: GPLv2+ Group: System Environment/Daemons @@ -8,6 +8,7 @@ Url: http://vtun.sourceforge.net Source0: http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz Source1: vtun.socket Source2: vtun.service +Source3: vtun.sysconfig Patch0: vtun-nostrip.patch Requires(post): systemd-units @@ -40,6 +41,7 @@ make %{?_smp_mflags} %install install -D -m 0644 -p %{SOURCE1} %{buildroot}/%{_unitdir}/vtun.socket install -D -m 0644 -p %{SOURCE2} %{buildroot}/%{_unitdir}/vtun.service +install -D -m 0644 -p %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig/vtun make install DESTDIR=%{buildroot} INSTALL_OWNER= INSTALL="/usr/bin/install -p" %post @@ -55,6 +57,7 @@ make install DESTDIR=%{buildroot} INSTALL_OWNER= INSTALL="/usr/bin/install -p" %defattr(-,root,root,-) %doc ChangeLog Credits FAQ README README.LZO README.Setup README.Shaper TODO vtund.conf %config(noreplace) %{_sysconfdir}/vtund.conf +%config(noreplace) %{_sysconfdir}/sysconfig/vtun %{_unitdir}/vtun.socket %{_unitdir}/vtun.service %{_sbindir}/vtund @@ -65,6 +68,16 @@ make install DESTDIR=%{buildroot} INSTALL_OWNER= INSTALL="/usr/bin/install -p" %{_mandir}/man8/vtund.8* %changelog +* Tue Dec 23 2014 Gabriel Somlo 3.0.3-11 +- enhanced service file (remove "KillMode", use default "cgroup" mode) + +* Thu Nov 20 2014 Gabriel Somlo 3.0.3-10 +- enhanced service file (-n to prevent daemonizing vtund) + +* Fri Nov 14 2014 Gabriel Somlo 3.0.3-9 +- added /etc/sysconfig/vtun environment file +- updated unit files + * Mon Aug 18 2014 Fedora Release Engineering - 3.0.3-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild @@ -74,7 +87,7 @@ make install DESTDIR=%{buildroot} INSTALL_OWNER= INSTALL="/usr/bin/install -p" * Sun Aug 04 2013 Fedora Release Engineering - 3.0.3-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild -* Mon May 13 2013 Gabriel Somlo 2.0.5-5 +* Mon May 13 2013 Gabriel Somlo 3.0.3-5 - added autoconf step to support aarch64 (#926708) * Wed May 01 2013 Gabriel Somlo 3.0.3-4 @@ -112,7 +125,7 @@ make install DESTDIR=%{buildroot} INSTALL_OWNER= INSTALL="/usr/bin/install -p" - add support for systemd (#661331) * Tue Nov 30 2010 Gabriel Somlo 3.0.1-8 -- using %ghost on /var/lock/vtund directory (#656720) +- using ghost on /var/lock/vtund directory (#656720) * Fri Aug 21 2009 Tomas Mraz - 3.0.1-7 - rebuilt with new openssl diff --git a/vtun.sysconfig b/vtun.sysconfig new file mode 100644 index 0000000..467bd8b --- /dev/null +++ b/vtun.sysconfig @@ -0,0 +1,16 @@ +# Comment out one of the following for client or server mode +# +# To run vtun as a server: +# +#OPTIONS='-s' +# +# +# +#To run vtun as a client, we need: +# +# - session name, e.g. "lion"; must be present in both client and server +# config files. +# +# - server address or host name. +# +#OPTIONS='lion vtun-server.example.com'