Skip to content
Snippets Groups Projects
Commit 5dd5dd27 authored by bta's avatar bta
Browse files

esamesync-esame: do not run if /opt/esame was not created.

The previous patch was wrong for two reasons:
- you can't put shell commands in a Exec, as there's no shell involved
- while you could split the two on two different Exec, it would not
  work anyhow because the unit runs as the esamesync user, and it cannot
  create the /opt/esame directory if the admin did not create it beforehand.

This one was tested to work; the machine boots correctly.

Not tested with labmanager; it is not supposed to be working properly
until you have working copy in /opt/esame, but it would be interesting
to see how it fails.
parent 0848ee48
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,10 @@ Description=esamesync esame
After=network-online.target
Wants=network-online.target
Before=display-manager.service getty.target
# Do not run if /opt/esame was not created.
# We do not check the permissions, but it must be writable by
# the esamesync user/group.
ConditionPathIsDirectory=/opt/esame
[Service]
Environment=RUNLEVEL=3
......@@ -10,7 +14,6 @@ Environment=RUNLEVEL=3
#ExecStart=/etc/init.d/esamesync esame
User=esamesync
Group=esamesync
ExecStartPre=-mkdir -p /opt/esame && chown esamesync:esamesync /opt/esame
ExecStart=/usr/libexec/labmanager/esamesync-esame.sh
#TimeoutSec=0
RemainAfterExit=yes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment