Set working directory in systemd service file
By default systemd will execute service with root directory (or home directory for user instance) which might result in attempts to create files in unexpected place. Let's set it to 'osmocom' subdir of state directory (/var/lib for system instance) instead. Related: OS#4821 Change-Id: I7696cd92953787591e7b4777ee79c2671326b972
This commit is contained in:
parent
5892b2e4db
commit
709aad28ed
|
@ -3,6 +3,8 @@ Description=Osmocom Media Gateway (MGW)
|
|||
|
||||
[Service]
|
||||
Type=simple
|
||||
StateDirectory=osmocom
|
||||
WorkingDirectory=%S/osmocom
|
||||
Restart=always
|
||||
ExecStart=/usr/bin/osmo-mgw -s -c /etc/osmocom/osmo-mgw.cfg
|
||||
RestartSec=2
|
||||
|
|
Loading…
Reference in New Issue