Correction de l'indentation
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
FROM python
|
||||
FROM debian
|
||||
RUN <<-EOF
|
||||
apt-get update
|
||||
apt-get install -y python3-cryptography python3-requests python3-toml
|
||||
apt-get install -y systemd python3 python3-cryptography python3-requests python3-toml
|
||||
EOF
|
||||
ADD scripts\* /airwatchConnector
|
||||
ADD services.py
|
||||
|
||||
10
services.py
10
services.py
@ -10,9 +10,9 @@ confFiles = os.listdir(confDir)
|
||||
confFiles = [conf for conf in confFiles if os.path.isfile(f"{confDir}/{conf}") and not conf.endswith(".conf")]
|
||||
|
||||
for conf in confFiles:
|
||||
# On forme un nom à partir du nom du fichier de conf sans l'extension
|
||||
# et on enlève les espaces
|
||||
confName = conf[:5].replace(' ', '')
|
||||
# On forme un nom à partir du nom du fichier de conf sans l'extension
|
||||
# et on enlève les espaces
|
||||
confName = conf[:5].replace(' ', '')
|
||||
|
||||
with open(f"{confDir}/{conf}", "r") as f:
|
||||
settings = toml.load(f)
|
||||
@ -24,8 +24,8 @@ for conf in confFiles:
|
||||
os.makedirs(f"{logDir}/{logPath}")
|
||||
|
||||
|
||||
with open(f"/etc/systemd/system/{confName}-sync.service", "w") as f:
|
||||
f.write(f"""[Unit]
|
||||
with open(f"/etc/systemd/system/{confName}-sync.service", "w") as f:
|
||||
f.write(f"""[Unit]
|
||||
Description=Script Airwatch pour la synchronisation des données Airwatch et GLPI.
|
||||
|
||||
[Service]
|
||||
|
||||
Reference in New Issue
Block a user