mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Merge pull request #1115 from lrusak/docker
docker: add temporary cleanup method for old systemd service
This commit is contained in:
commit
e51f02400d
@ -1,3 +1,6 @@
|
||||
8.1.111
|
||||
- Add temporary cleanup for old systemd service
|
||||
|
||||
8.1.110
|
||||
- Update to docker 1.12.5
|
||||
- Adjust the systemd service 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 imx6 WeTek_Hub WeTek_Play_2 Odroid_C2"
|
||||
PKG_LICENSE="ASL"
|
||||
|
@ -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():
|
||||
|
Loading…
x
Reference in New Issue
Block a user