Reputation: 333
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?
Upvotes: 0
Views: 1962
Reputation: 103
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.
Upvotes: 1