OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Opensprinkler Pi and systemd (Raspbian Jessie)
- This topic has 2 replies, 2 voices, and was last updated 10 years ago by
robgreen.
-
AuthorPosts
-
May 30, 2016 at 2:59 am #42687
robgreenParticipantHello
I ask for a little help , I’m using debian jessie of sd ,
I installed following
“https://opensprinkler.freshdesk.com/support/solutions/articles/5000631599-installing-and-updating-the-unified-firmware"
" Cd ~
git clone https://github.com/OpenSprinkler/OpenSprinklerGen2.git
cd OpenSprinklerGen2
sudo ./build.sh Ospi "However
Jessie has switched to systemd and the software shall be undertaken through service is no longer used rc.localI ask you to please show me how to set systemd
to follow a draft
thank you1 )
sudo nano /etc/systemd/system/xxxx.service[ Unit ]
Description = xxx[ Service ]
Type = oneshot
ExecStart = xxxx[ Install]
WantedBy = multi-user.target2)
insserv
systemctl enable xxx.service3)
systemctl start xxx.servicMay 30, 2016 at 5:53 am #42690
PeterParticipantOK, so this is what I did.
1) Build OSPi Firmware as per normal but select “No” when prompted to auto-start OpenSprinkler.
$ sudo ./build.sh OSPI2) Create a Systemd configuration file to control the start-up of OSPi
$ sudo nano /etc/systemd/system/ospi.service3) Add the following lines to the ospi.service file and then save the file
[Unit] Description=OpenSprinkler Server # After=weather.service apache2.service [Service] # ExecStart=/usr/bin/stdbuf -oL /home/peter/OpenSprinklerGen2/OpenSprinkler ExecStart=/home/peter/OpenSprinklerGen2/OpenSprinkler WorkingDirectory=/home/peter/OpenSprinklerGen2 Restart=always RestartSec=10 [Install] WantedBy=multi-user.targetNote that in my setup, I need OSPi to wait until I have started the web server and weather service as I host these on my local RPi. Also, I use “stdbuf” to set the output from OSPi to be line buffered (i.e. -oL) so that diagnostic output is written immediately to the journal log file. Both of these may be unnecessary for you so have commented out. You will need to adjust the directories to your OSPi directory location.
4) Initialise the service and set to auto-start
$ sudo systemctl enable ospi.service $ sudo systemctl start ospi.service5) You can check that the service is running successfully with the systemctl command
$ systemctl status ospi.serviceThat should be it.
PeteMay 31, 2016 at 7:15 am #42711
robgreenParticipantHi
excellent guide
I completed the installation
we can say that everything is workingthank you very much !
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Opensprinkler Pi and systemd (Raspbian Jessie)