Systemctl starts process but does not execute process right

This forum is for discussion about general software issues.

Systemctl starts process but does not execute process right

Postby optomus » Wed Nov 30, 2016 10:22 pm

I am running Arch Arm on a Raspberry Pi3. I have written a python script to simply read if a pin goes high and append to a file if it does. When I run the script manually it runs perfectly. I have written a service file and have used systemctl to both start and enable it. When checking systemctl I can see that the service is loaded active and running. But after confirming that the process is running by systemctl and top, I can cause the pin to go high for as long as I like and I get no writes to the log file.
This is the service file I have written:
[Unit]
Description=Trigger upon alarm event
[Service]
ExecStart=/home/admin/trigger_detect.py
Restart=always
RestartSec=30
[Install]
WantedBy=multi-user.target
I have written essentially this exact script on other images with the exception of the Restart=always and RestartSec=30
Am I missing something? Obviously I have successfully chmod +x the script because I can run it manually... I am unsure what I am missing.
Thanks in advance and let me know what other information I should provide.
optomus
 
Posts: 6
Joined: Wed Nov 30, 2016 10:14 pm

Re: Systemctl starts process but does not execute process ri

Postby optomus » Wed Nov 30, 2016 11:17 pm

.... It was a permissions issue. Closed.
optomus
 
Posts: 6
Joined: Wed Nov 30, 2016 10:14 pm


Return to General

Who is online

Users browsing this forum: No registered users and 2 guests