Hi! I am trying to use AssertPathExists in a systemd unit but it seems it not working. Does anyone have problems with this?
i have this in unit : AssertPathExists= AssertPathExists=/etc/mlsensor/mlsensor.properties
but then when i start the service i get no errors : 26225 /usr/bin/java -Xms16m -Xmx32m -DMLSENSOR_HOME=/tmp -Djava.util.logging.config.class=lia.Monitor.monitor.LoggerConfigClass -Dlia.Monitor.ConfigURL=file:/etc/mlsensor/mlsensor.properties -jar /usr/share/java/mlsensor/MLSensor.jar
i can't modify the java application, i am just doing an systemd unit for it...
Anyone have any experience making systemd unit fail if the configuration file is not in place?
Thank you! Adrian
Adrian Sevcenco:
Hi! I am trying to use AssertPathExists in a systemd unit but it seems it not working. Does anyone have problems with this?
i have this in unit : AssertPathExists= AssertPathExists=/etc/mlsensor/mlsensor.properties
It might help if you post the whole unit file ...
Which section of the unit file is this in?
It needs to be in the [Unit] section
James Pearson
On 01/14/2018 08:08 PM, James Pearson wrote:
Adrian Sevcenco:
Hi! I am trying to use AssertPathExists in a systemd unit but it seems it not working. Does anyone have problems with this?
i have this in unit : AssertPathExists= AssertPathExists=/etc/mlsensor/mlsensor.properties
It might help if you post the whole unit file ...
Which section of the unit file is this in?
It needs to be in the [Unit] section
Thanks a lot!!! i did not process that i was looking at the man page of systemd.unit :))
Adrian