From efbe5b556d0d84f4ecfdcb86430768b230c2f0d0 Mon Sep 17 00:00:00 2001 From: Tobias Schmidl Date: Mon, 11 Feb 2019 04:50:44 +0100 Subject: [PATCH] added apt-cache.service file --- .config/systemd/user/apt-cache.service | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .config/systemd/user/apt-cache.service diff --git a/.config/systemd/user/apt-cache.service b/.config/systemd/user/apt-cache.service new file mode 100644 index 0000000..6745704 --- /dev/null +++ b/.config/systemd/user/apt-cache.service @@ -0,0 +1,16 @@ +[Unit] +Description=apt-cache +ConditionPathExists=/var/run/docker.pid +ConditionPathExists=/var/run/docker.sock +ConditionPathIsDirectory=/var/run/docker + +[Service] +TimeoutStartSec=0 +#ExecStartPre=/usr/bin/docker stop apt-cache +ExecStartPre=/usr/bin/docker pull schtobia/apt_cacher_ng +ExecStop=/usr/bin/docker stop -t 2 %n +ExecStart=/usr/bin/docker run -d --rm -p 3142:3142 --volume aptcache-cache:/var/cache/apt-cacher-ng --volume aptcache-log:/var/log/apt-cacher-ng --name %n --hostname apt-cache schtobia/apt_cacher_ng + +[Install] +WantedBy=multi-user.target +