1

So, I have start.sh file to start imagecache service. And I have executable binary file "imgproxy" and I need start it and pass to it two parameters like as text file. Body of start.sh file:

export IMGPROXY_LOCAL_FILESYSTEM_ROOT="/home/filestorage/media" export IMGPROXY_BIND=":9608" ./home/tools/imgproxy/imgproxy -keypath ./home/tools/imgproxy/key.txt -saltpath ./home/tools/imgproxy/salt.txt ExecStartPre=nohup /bin/bash /home/tools/imgproxy/start.sh </dev/null >/dev/null 2>&1 & 

I starts it with command "ExecStartPre" because I have main service and binary file their dependency. I must start this binary file before starting my main service.

So, when I start service appears following error:

systemd[1]: [/etc/systemd/system/imagecache.service:11] Executable path is not absolute, ignoring: nohup bash /home/tools...ull 2>&1 & 

Anybody know how to fix it?

Thank you in advance.

1 Answer 1

1

An absolute path is the full path to a file starting at the root /. It looks like you need to supply the absolute path of nohup which on a CentOS 7 system is /usr/bin/nohup.


I really don't know the tools you are using but if possible I would be tempted to make the target of the ExecPreStart its own service and make the main service dependent on it. The docs for systemd.service are well worth a read.

2
  • I will try your answer @lain! Commented Dec 25, 2018 at 11:58
  • 2
    You don't need to nohup something you start in a systemd unit. Just call it directly. Commented Dec 25, 2018 at 17:14

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.