fix(services): replace stray gitea reference with a generic identifier in deiable/enable

This commit is contained in:
Houkime 2023-11-22 14:50:53 +00:00
parent f5999516fa
commit 368ab22fbb

View file

@ -145,7 +145,7 @@ class Service(ABC):
"""Enable the service. Usually this means enabling systemd unit.""" """Enable the service. Usually this means enabling systemd unit."""
name = cls.get_id() name = cls.get_id()
with WriteUserData() as user_data: with WriteUserData() as user_data:
if "gitea" not in user_data: if name not in user_data:
user_data[name] = {} user_data[name] = {}
user_data[name]["enable"] = True user_data[name]["enable"] = True
@ -154,7 +154,7 @@ class Service(ABC):
"""Disable the service. Usually this means disabling systemd unit.""" """Disable the service. Usually this means disabling systemd unit."""
name = cls.get_id() name = cls.get_id()
with WriteUserData() as user_data: with WriteUserData() as user_data:
if "gitea" not in user_data: if name not in user_data:
user_data[name] = {} user_data[name] = {}
user_data[name]["enable"] = False user_data[name]["enable"] = False