0

I'm trying to use systemctl to start 2 programs with one service (if that's what you call them). They're both python scripts, I tried the:

[service]
Type=simple
ExecStart=/usr/bin/python %i

In the service file. when I run

systemctl start security@/home/pi/pythonProject/p1.py security@/home/pi/pythonProject/p2.py

it fails to start it, and the error code says it tried to start

[email protected]

And same for p2.py . Can anyone offer any assistance for this?

1 Answer 1

1

First, you need to fix [service] to [Service]. That is a syntax error. Second, you need to fix %i to %f. systemd escapes / in instance name to -. %f can get unescaped instance name.

More detail.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.