In rockcraft.yaml WORKDIR is not supported, so it needs to be specified in Pebble service definition by using working-dir parameter.
However, working-dir is not supported in Juju 2.9.x. So, we are entering to the startup directory first as a workaround.
Change-Id: I5949b16ce7e28dfb3f235eabd64062a5a185aa9c
Signed-off-by: Dario Faccin <dario.faccin@canonical.com>
self.service_name: {
"override": "replace",
"summary": "mon service",
- "command": "/bin/bash scripts/start.sh",
+ "command": "/bin/bash -c 'cd /app/osm_mon/ && /bin/bash start.sh'",
"startup": "enabled",
"user": "appuser",
"group": "appuser",
+ "working-dir": "/app/osm_mon", # This parameter has no effect in Juju 2.9.x
"environment": environment,
}
},