]> kaliko git repositories - mpd-sima.git/commitdiff
Fixed startup
authorkaliko <kaliko@azylum.org>
Fri, 21 Oct 2022 05:55:56 +0000 (07:55 +0200)
committerkaliko <kaliko@azylum.org>
Fri, 21 Oct 2022 06:09:46 +0000 (08:09 +0200)
MPD_sima not starting when var dir is not present.

.gitlab-ci.yml
sima/utils/config.py

index 8379c87799f6f7d06aadf0ccdde9ee8fd26ea884..195423eef5542b2da4108e14bfb2b61a304ccb6f 100644 (file)
@@ -32,12 +32,17 @@ smoketest:
   - pip install dist/*.whl
   # smoke test
   - mpd-sima --help
+  - TRACE=y ./mpd-sima -d --pid ./mpd-sima.pid -l ./mpd-sima.log
+  - sleep 10
+  - test -f ./mpd-sima.pid && kill $(cat ./mpd-sima.pid)
   artifacts:
     expire_in: 1 hour
     paths:
     - dist/*.whl
     - dist/*.tar.gz
     - dist/*.zip
+    - ./mpd-sima.pid
+    - ./mpd-sima.log
 
 unittests:
   stage: test
index caaac3ed64f388f7346c7bc663ca6b73f8e84aa8..1df4e9e5eb430c013f62a19b8eb12192c7325e82 100644 (file)
@@ -143,9 +143,6 @@ class ConfMan:  # CONFIG MANAGER CLASS
         self.supersedes_config_with_cmd_line_options()
         # set dbfile
         self.config['sima']['db_file'] = join(self.config['sima']['var_dir'], 'sima.db')
-        # Controls files access
-        self.control_facc()
-
         # Create directories
         data_dir = self.config['sima']['var_dir']
         if not isdir(data_dir):
@@ -153,6 +150,9 @@ class ConfMan:  # CONFIG MANAGER CLASS
             makedirs(data_dir)
             chmod(data_dir, 0o700)
 
+        # Controls files access
+        self.control_facc()
+
     def control_facc(self):
         """Controls file access.
         This is relevant only for file provided through the configuration file