平衡点


2014/06/30

_ squid3.service[Computer] [Debian

systemd用に squid3.service を書いてみた. 通常の用途では multi-user.target/etc/init.d/squid3 を呼んで起動する ので良いのだろうけれど, resolvconf が入っていると, 初回 boot 時に

...
811 ?        Ss     0:00 /bin/sh /etc/init.d/dnsmasq systemd-start-resolvconf
821 ?        S      0:00  \_ run-parts --arg=-a --arg=lo.dnsmasq /etc/resolvconf/update.d
863 ?        S      0:00      \_ run-parts /etc/resolvconf/update-libc.d
901 ?        S      0:00          \_ /bin/sh /etc/resolvconf/update-libc.d/squid3
902 ?        S      0:00              \_ /bin/sh /usr/sbin/invoke-rc.d squid3 reload
936 ?        S      0:00                  \_ systemctl reload squid3.service
...

となって, 上手く起動しなかった.

中身は以下の通り:

% cat /lib/systemd/system/squid3.service
[Unit]
Description=Full featured Web Proxy cache (HTTP proxy)
Before=resolvconf.service

[Service]
Type=forking
PIDFile=/run/squid3.pid
ExecStartPre=/usr/sbin/squid3 -z -f /etc/squid3/squid.conf
ExecStart=/usr/sbin/squid3 -YC -f /etc/squid3/squid.conf
ExecReload=/usr/sbin/squid3 -k reconfigure

[Install]
WantedBy=network.target

一応(個人的には)幸せにはなったが, これで良いのかどうかは定かではない.


連絡先など

portrait

最近の日記

一覧

Back to Top ▲