Am 03.09.2015 um 16:45 schrieb Eliezer Croitoru:
I am working on a service for squid caching service. I have a need to define LimitNOFILE from an environmental variable instead of only the service file. The service unit I am using is:
i guess it works the same way as for ExecStart params EnvironmentFile=-/etc/sysconfig/httpd Environment="PATH=/usr/bin:/usr/sbin" ExecStart=/usr/sbin/httpd $OPTIONS -D FOREGROUND [root@rh:~]$ cat /etc/sysconfig/httpd # Configuration file for the httpd service. OPTIONS="-D workstation" STOP_TIMEOUT=5 OPENSSL_NO_DEFAULT_ZLIB=1 LANG=C [root@rh:~]$ ps aux | grep httpdroot 5079 0.0 0.3 409796 52552 ? Ss 09:48 0:01 /usr/sbin/httpd -D workstation -D FOREGROUND
[Unit] Description=Squid Web Proxy Server Documentation=man:squid(8) After=network.target [Service] EnvironmentFile=-/etc/sysconfig/squid Type=forking LimitNOFILE=16384 PIDFile=/var/run/squid.pid ExecStartPre=/usr/bin/mkdir -p /var/run/squid ExecStartPre=/usr/bin/chown squid.squid /var/run/squid ExecStart=/usr/sbin/squid -sYC ExecReload=/usr/sbin/squid -kreconf ExecStop=/usr/sbin/squidshut.sh TimeoutStopSec=36 KillMode=none [Install] WantedBy=multi-user.target ##END I have tried couple things and I think I am in the wrong way. Maybe there is some include file I can use as configurable else then EnvironmentFile to just contain the LimitNOFILE variable?
signature.asc
Description: OpenPGP digital signature
_______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
