Merge pull request #1116 from lrusak/docker-libreelec-7.0

backport of #1115  (docker: add temporary cleanup method for old systemd service)
This commit is contained in:
Christian Hewitt 2017-01-02 10:32:39 +04:00 committed by GitHub
commit 5470606f30
3 changed files with 36 additions and 1 deletions

View File

@ -1,3 +1,6 @@
7.0.111
- Add temporary cleanup for old systemd service
7.0.110
- Update to docker 1.12.5
- Adjust the systemd service file

View File

@ -18,7 +18,7 @@
PKG_NAME="docker"
PKG_VERSION="1.12.5"
PKG_REV="110"
PKG_REV="111"
PKG_ARCH="any"
PKG_ADDON_PROJECTS="Generic RPi RPi2"
PKG_LICENSE="ASL"

View File

@ -272,6 +272,38 @@ class Main(object):
def __init__(self, *args, **kwargs):
#############################
# Temp cleanup for old method
restart_docker = False
if os.path.islink('/storage/.config/system.d/service.system.docker.socket'):
os.remove('/storage/.config/system.d/service.system.docker.socket')
if os.path.islink('/storage/.config/system.d/docker.socket'):
os.remove('/storage/.config/system.d/docker.socket')
if os.path.islink('/storage/.config/system.d/service.system.docker.service'):
if 'systemd' in os.readlink('/storage/.config/system.d/service.system.docker.service'):
os.remove('/storage/.config/system.d/service.system.docker.service')
restart_docker = True
if os.path.islink('/storage/.config/system.d/docker.service'):
if 'systemd' in os.readlink('/storage/.config/system.d/docker.service'):
os.remove('/storage/.config/system.d/docker.service')
restart_docker = True
if os.path.islink('/storage/.config/system.d/multi-user.target.wants/service.system.docker.service'):
if 'systemd' in os.readlink('/storage/.config/system.d/multi-user.target.wants/service.system.docker.service'):
os.remove('/storage/.config/system.d/multi-user.target.wants/service.system.docker.service')
restart_docker = True
if restart_docker:
oe.execute('systemctl enable /storage/.kodi/addons/service.system.docker/system.d/service.system.docker.service')
oe.execute('systemctl restart /storage/.kodi/addons/service.system.docker/system.d/service.system.docker.service')
# end temp cleanup
#############################
monitor = DockerMonitor(self)
while not monitor.abortRequested():