You are not logged in.
Pages: 1
Hello there,
as a newby i am slowly getting to grips with Arch Linux, but I cannot resolve the following after trying for some time.
I have ArchLinux running on a Raspberry PI.
I have a programme called aprx installed and to run it, I execute /sbin/aprx. The programme then starts, creates a pid file, called aprx.pid in the var/run directory and works smoothly, The programme uses a usn to serial port, which also works fine.(ttyUSB0)
Now I need this program to start at boot time, so I read up on systemd, and I wrote a file called aprx.service, put it in /etc/systemd/systems/, did all the right things to enable it as a service, i believe...
The content of aprx.service is as follows:
Unit]
Description=APRX Server, an iGate and Digipeater
After=dev-ttyUSB0.device
#
[Service]
ExecStart=/sbin/aprx
#
[Install]
WantedBy=multi-user.target
After reboot I get the following output on systemctl - status aprx.service
[root@pa0esh ~]# systemctl status aprx.service
aprx.service - APRX Server, an iGate and Digipeater
Loaded: loaded (/etc/systemd/system/aprx.service; enabled)
Active: inactive (dead) since Thu, 1970-01-01 01:00:06 BST; 43 years and 0 months ago
Process: 97 ExecStart=/sbin/aprx (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/aprx.service
[root@pa0esh ~]#
However, the programme did nit really start, and there is also not a pid file.
So what am I doing wrong here ?
Any help is much appreciated.
Erik
Offline
I suspect it did start, and was then stopped. You'll need "Type=forking" in the [Service] section.
But - if this is a raspberry pi, this must be ArchARM right? If so, they have their own forums, and as it is a different system we would not be able to help here.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Thanks for the quick reply - You are right, am I going there but will add the type to it...
Erik
Offline
But - if this is a raspberry pi, this must be ArchARM right? If so, they have their own forums, and as it is a different system we would not be able to help here.
They do indeed have a forum see here http://archlinuxarm.org/forum/ - and have a look under the "Devices" section on the forum.
Our enemies are your enemies, Nick. Disorder, war. It's just a matter of time before a dirty bomb goes off in Moscow, or an EMP fries Chicago. --- Alexander Pierce, Captain America: Winter Soldier
Access Denied! De-cryption failed, override denied all files sealed! --- Triskelion, Shield OS
-----
How to ask questions the smart way
Offline
Yes indeed, it is ArchARM, Trilby
And so i found the solution for the service file aprx.service
Still, thanks a lot for pointing me out.
Erik
-------------------------------------------------------------------
[Unit]
Description=APRX Server, an iGate and Digipeater
After=dev-ttyUSB0.device
[Service]
User=root
Type=oneshot
RemainAfterExit=yes
ExecStart=/sbin/aprx
[Install]
WantedBy=multi-user.target
Offline
Pages: 1