123solar.service

Talks about solar stuff
jeanmarc
Posts: 1901
Joined: Thu Aug 29, 2013 7:16 am

Re: 123solar.service

Post by jeanmarc » Sat Apr 12, 2014 5:34 pm

Might be a better idea to ask on Arch forum, i can't find a solution :?

elettron
Posts: 11
Joined: Sat Apr 12, 2014 9:30 am

Re: 123solar.service

Post by elettron » Sat Apr 12, 2014 5:38 pm

Tnak you .

elettron
Posts: 11
Joined: Sat Apr 12, 2014 9:30 am

Re: 123solar.service

Post by elettron » Sun Apr 13, 2014 9:12 am

If someone were to have the same problem, I made this trivial script to put in crontab:

Code: Select all

#!/bin/bash
programma='aurora'
if ps ax | grep -v grep | grep $programma > /dev/null
then
echo "Aurora è già avviato"
else
echo "Aurora sta per essere avviato"
systemctl start 123solar.service
fi
exit

jeanmarc
Posts: 1901
Joined: Thu Aug 29, 2013 7:16 am

Re: 123solar.service

Post by jeanmarc » Sun Apr 13, 2014 9:36 am

I wonder if "Requires network.target" is not the solution..

Code: Select all

[Unit]
Description=123Solar
Requires=network.target
After=network.target

[Service]
Type=oneshot
ExecStart=/usr/bin/curl http://localhost/123solar/scripts/boot123s.php

[Install]
WantedBy=default.target

elettron
Posts: 11
Joined: Sat Apr 12, 2014 9:30 am

Re: 123solar.service

Post by elettron » Mon Apr 14, 2014 2:11 pm

:P
Finally , after many attempts I solved it, I do not understand why, despite the correct settings 123solar.service part too early so it was enough to add a few seconds of waiting.
[Unit]
Description=123Solar
Requires=network-online.target
After=network.target

[Service]
Type=oneshot
ExecStart=/usr/bin/sleep 10
ExecStart=/usr/bin/curl http://localhost/123solar/scripts/boot123s.php


[Install]
WantedBy=default.target

jeanmarc
Posts: 1901
Joined: Thu Aug 29, 2013 7:16 am

Re: 123solar.service

Post by jeanmarc » Mon Apr 14, 2014 2:46 pm

Maybe webserver and PHP haven't started yet.. :?

elettron
Posts: 11
Joined: Sat Apr 12, 2014 9:30 am

Re: 123solar.service

Post by elettron » Mon Apr 14, 2014 3:03 pm

Only for information , now 123solar work and i'm happy :mrgreen:
[root@alarmpi ~]# systemd-analyze blame
10.809s 123solar.service
5.897s netctl@ethernet\x2dstatic.service
3.179s systemd-readahead-done.service
860ms php-fpm.service
814ms systemd-udev-trigger.service
756ms nginx.service
617ms systemd-logind.service
428ms kmod-static-nodes.service
380ms sys-kernel-debug.mount
290ms systemd-readahead-collect.service
287ms systemd-modules-load.service
267ms systemd-tmpfiles-setup-dev.service
262ms systemd-readahead-replay.service
261ms user@0.service
256ms systemd-remount-fs.service
249ms systemd-journal-flush.service
240ms boot.mount
233ms systemd-sysctl.service
230ms ntpd.service
174ms dev-mqueue.mount
158ms systemd-tmpfiles-setup.service
147ms tmp.mount
146ms systemd-random-seed.service
133ms sys-kernel-config.mount
132ms systemd-tmpfiles-clean.service
132ms systemd-vconsole-setup.service
98ms systemd-udevd.service
75ms systemd-update-utmp.service
25ms systemd-user-sessions.service

jeanmarc
Posts: 1901
Joined: Thu Aug 29, 2013 7:16 am

Re: 123solar.service

Post by jeanmarc » Mon Apr 28, 2014 5:30 pm

Tried it as well, the sleep 10 did the trick.. but I still don't know what it is waiting :geek:

TonyP62
Posts: 97
Joined: Fri May 01, 2015 11:07 pm

Re: 123solar.service

Post by TonyP62 » Sun May 17, 2015 3:50 pm

I have modified the 123solar.service as in this thread , but 123solar don't auto-start . I must start it into the admin page. this is because 123solar.service starts before apache2 ?
In which way i can start it after apache2 ?

jeanmarc
Posts: 1901
Joined: Thu Aug 29, 2013 7:16 am

Re: 123solar.service

Post by jeanmarc » Sun May 17, 2015 7:33 pm

The sleep 10 after network.target works fine here. Maybe wait a bit longer to make sure php is started.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests