You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Jan-Frode Myklebust <ja...@tanso.net> on 2012/03/18 19:36:53 UTC

[PATCH] TS-1148: Support systemd activation of ATS.

---
 contrib/trafficserver.service |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
 create mode 100644 contrib/trafficserver.service

diff --git a/contrib/trafficserver.service b/contrib/trafficserver.service
new file mode 100644
index 0000000..7edf9c8
--- /dev/null
+++ b/contrib/trafficserver.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Apache Traffic Server is a fast, scalable and extensible caching proxy server.
+After=syslog.target network.target
+
+[Service]
+Type=simple
+EnvironmentFile=-/etc/sysconfig/trafficserver
+PIDFile=/var/run/trafficserver/cop.pid
+ExecStart=/usr/bin/traffic_cop $TC_DAEMON_ARGS
+ExecReload=/usr/bin/traffic_line -x
+
+[Install]
+WantedBy=multi-user.target
-- 
1.7.1


[PATCH] TS-1148: Support systemd activation of ATS. This time as rc/trafficserver.service, with automake string substitutions.

Posted by Jan-Frode Myklebust <ja...@tanso.net>.
---
 configure.ac                |    1 +
 rc/trafficserver.service.in |   13 +++++++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
 create mode 100644 rc/trafficserver.service.in

diff --git a/configure.ac b/configure.ac
index 63484ce..5d1b777 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1380,6 +1380,7 @@ AC_CONFIG_FILES([rc/Makefile])
 AC_CONFIG_FILES([rc/trafficserver])
 AC_CONFIG_FILES([rc/trafficserver.xml])
 AC_CONFIG_FILES([rc/trafficserver.conf])
+AC_CONFIG_FILES([rc/trafficserver.service])
 AC_CONFIG_FILES([iocore/aio/Makefile])
 AC_CONFIG_FILES([iocore/cache/Makefile])
 AC_CONFIG_FILES([iocore/cluster/Makefile])
diff --git a/rc/trafficserver.service.in b/rc/trafficserver.service.in
new file mode 100644
index 0000000..c0582d6
--- /dev/null
+++ b/rc/trafficserver.service.in
@@ -0,0 +1,13 @@
+[Unit]
+Description=Apache Traffic Server is a fast, scalable and extensible caching proxy server.
+After=syslog.target network.target
+
+[Service]
+Type=simple
+EnvironmentFile=-/etc/sysconfig/trafficserver
+PIDFile=@exp_runtimedir@/cop.pid
+ExecStart=@exp_bindir@/traffic_cop $TC_DAEMON_ARGS
+ExecReload=@exp_bindir@/traffic_line -x
+
+[Install]
+WantedBy=multi-user.target
-- 
1.7.1


Re: [PATCH] TS-1148: Support systemd activation of ATS.

Posted by Jan-Frode Myklebust <ja...@tanso.net>.
On Sun, Mar 18, 2012 at 07:37:01PM -0000, Igor Galić wrote:
> 
> I'd put it in rc/ -- like the others.
> And I'd make it a Makefile.am target to replace
> 
> > > +EnvironmentFile=-/etc/sysconfig/trafficserver
> > > +PIDFile=/var/run/trafficserver/cop.pid
> > > +ExecStart=/usr/bin/traffic_cop $TC_DAEMON_ARGS
> > > +ExecReload=/usr/bin/traffic_line -x
> 
> These with the target values for the system in question.

I don't think there's anything to replace /etc/sysconfig/trafficserver
with, so this needs to be hardcoded or dropped (ref:
http://0pointer.de/blog/projects/on-etc-sysinit.html). The others I've
replaced with:

	PIDFile=@exp_runtimedir@/cop.pid
	ExecStart=@exp_bindir@/traffic_cop $TC_DAEMON_ARGS
	ExecReload=@exp_bindir@/traffic_line -x

Updated patch coming in a minute..


  -jf

Re: [PATCH] TS-1148: Support systemd activation of ATS.

Posted by Igor Galić <i....@brainsware.org>.

----- Original Message -----
> niice!! Thanks

BUT.
 
> ----- Original Message -----
> > ---
> >  contrib/trafficserver.service |   13 +++++++++++++

I'd put it in rc/ -- like the others.
And I'd make it a Makefile.am target to replace 

> > +EnvironmentFile=-/etc/sysconfig/trafficserver
> > +PIDFile=/var/run/trafficserver/cop.pid
> > +ExecStart=/usr/bin/traffic_cop $TC_DAEMON_ARGS
> > +ExecReload=/usr/bin/traffic_line -x

These with the target values for the system in question.

So long,

i

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE


Re: [PATCH] TS-1148: Support systemd activation of ATS.

Posted by Igor Galić <i....@brainsware.org>.
niice!! Thanks

----- Original Message -----
> ---
>  contrib/trafficserver.service |   13 +++++++++++++
>  1 files changed, 13 insertions(+), 0 deletions(-)
>  create mode 100644 contrib/trafficserver.service
> 
> diff --git a/contrib/trafficserver.service
> b/contrib/trafficserver.service
> new file mode 100644
> index 0000000..7edf9c8
> --- /dev/null
> +++ b/contrib/trafficserver.service
> @@ -0,0 +1,13 @@
> +[Unit]
> +Description=Apache Traffic Server is a fast, scalable and extensible
> caching proxy server.
> +After=syslog.target network.target
> +
> +[Service]
> +Type=simple
> +EnvironmentFile=-/etc/sysconfig/trafficserver
> +PIDFile=/var/run/trafficserver/cop.pid
> +ExecStart=/usr/bin/traffic_cop $TC_DAEMON_ARGS
> +ExecReload=/usr/bin/traffic_line -x
> +
> +[Install]
> +WantedBy=multi-user.target
> --
> 1.7.1
> 
> 

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE