Quote:
Originally Posted by TenTenths
Right, what everyone so far has missed is that you're not starting your new file properly.
You are trying to execude a php file directly, however in your example when you say it's working from the command line you show that you're actually running it with:
Change:
Code:
ExecStart=/home/pi/PlaneAlert/aircraftdbcheck.php
to:
Code:
ExecStart=/the/path/to/php /home/pi/PlaneAlert/aircraftdbcheck.php
and see how you get on.
|
: ) That worked.
Code:
$ sudo service aircraftdbcheck status
● aircraftdbcheck.service - aircraftdbcheck.php
Loaded: loaded (/etc/systemd/system/aircraftdbcheck.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2018-11-07 09:11:47 CST; 6s ago
Main PID: 486 (php)
CGroup: /system.slice/aircraftdbcheck.service
└─486 /usr/bin/php /home/pi/PlaneAlert/aircraftdbcheck.php
What I dont understand is that how come planealert does work via service? I do not have /usr/bin/php in its execution path. So weird.