我的操作系统是 Ubuntu 16.04.02LTS 是从 14.04 升上去的 比如 squid : /usr/local/squid/sbin/squid -s 是后台启动 /usr/local/squid/sbin/squid -k shutdown 是关闭
我新增了一个文件:/lib/systemd/system/squid.service
[Unit]
Description=squid , a HTTP(S) proxy server
Documentation=https://blog.ruiruige1991.xyz
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/squid/sbin/squid -s
ExecStop=/usr/local/squid/sbin/squid -k shutdown
ExecReload=/usr/local/squid/sbin/squid -k reconfigure
然后每次执行systemctl start squid.service
,发现都起不来
执行journald -xe
发现有以下日志:
Mar 06 16:04:41 NyaVM-VPS-updwugzl systemd[1]: Started squid , a HTTP(S) proxy server.
-- Subject: Unit squid.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit squid.service has finished starting up.
--
-- The start-up result is done.
Mar 06 16:04:41 NyaVM-VPS-updwugzl squid[21867]: Squid Parent: will start 1 kids
Mar 06 16:04:41 NyaVM-VPS-updwugzl squid[21867]: Squid Parent: (squid-1) process 21870 started
Mar 06 16:04:41 NyaVM-VPS-updwugzl squid[21868]: squid: No running copy
个人感觉:
有没有人有这方面的经验?
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.