I am on Arch Linux and have this service named toto.service in /etc/systemd/system/ that I want to run:
[Unit]
Description=Toto
After=network-online.target
[Service]
ExecStart=/opt/toto.sh
[Install]
WantedBy=multi-user.target
Where toto.sh contains:
#!/bin/bash
echo toto
And when I start it, it fails with the following error as follows:
Jun 13 00:11:15 scx systemd[1]: Started Toto.
Jun 13 00:11:15 scx (test.sh)[14097]: toto.service: Failed to locate executable /opt/toto/toto.sh: No such file or directory
Jun 13 00:11:15 scx (test.sh)[14097]: spark.service: Failed at step EXEC spawning /opt/toto/toto.sh: No such file or directory
Jun 13 00:11:15 scx systemd[1]: toto.service: Main process exited, code=exited, status=203/EXEC
Jun 13 00:11:15 scx systemd[1]: toto.service: Failed with result 'exit-code'.
Why doesn’t it find /opt/toto/toto.sh?