Hello folks,
I have a machinekit config which works when I start my python script via
console. If I want to start the script at boot up with systemd, it will not
load machinekit.
The python script is:
#!/usr/bin/python
import sys
import os
import subprocess
import time
from machinekit import launcher
from machinekit import rtapi
os.chdir(os.path.dirname(os.path.realpath(__file__)))
launcher.set_debug_level(5)
try:
launcher.check_installation()
launcher.cleanup_session()
launcher.register_exit_handler() # needs to executed after HAL files
launcher.ensure_mklauncher()
launcher.start_process('configserver')
launcher.start_process('machinekit mkwrapper.ini')
while True:
launcher.check_processes()
time.sleep(1)
except subprocess.CalledProcessError:
launcher.end_session()
sys.exit(1)
sys.exit(0)
and the service file is:
[Unit]
Description=Starts my Uber-awesome Machinekit configuration
After=syslog.target network.target
[Service]
Type=simple
ExecStart=/usr/bin/python /home/machinekit/mkwrapper-sim/run.py
User=machinekit
[Install]
WantedBy=multi-user.target
Does anyone have an idea?
Best regards,
David
--
website: http://www.machinekit.io blog: http://blog.machinekit.io github:
https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.