i Would know if it's possible to create service with the same script started with different input parameters.
Such as:
[Unit]
Description=script description
[Service]
Type=simple
ExecStart=/script.py parameters1
ExecStart=/script.py parameters2
Restart=on-failure
[Install]
WantedBy=multi-user.target
is it possible? then it will launched to serial-mode? or into two different process? Best regards
解决方案
if Type=simple in your unit file, you can only specify one ExecStart, but you can add as many ExecStartPre,ExecStartPost`, but none of this is suited for long running commands, because they are executed serially and everything one start is killed before starting the next one.
If Type=oneshot you can specify multiple ExecStart, they run serially no