Git Product home page Git Product logo

Comments (5)

dawskit avatar dawskit commented on July 25, 2024 2

I've done startup code by systemd service.
You need to do below steps:

  1. create a file picoReflow.service in /etc/sysemd/system by command $ sudo nano picoReflow.service

if your username is pi and picoReflow is installed in location /home/pi/picoReflow you don't need to make any changes in code below.

put in file code:

[Unit]
#Human redable name of the unit
Description=picoReflow Service

[Service]
#Command to execute when the service is started
ExecStart=/usr/bin/python /home/pi/picoReflow/picoreflowd.py

[install]
WantedBy=default.target
  1. $ sudo chown root:root picoReflow.service
  2. $ sudo chmod 664 picoReflow.service
  3. $ sudo systemctl enable /etc/systemd/system/picoReflow.service
  4. sudo systemctl daemon-reload
  5. test if script is working by typing $ sudo systemctl | grep picoReflow.service

You should get answer:
$ picoreflow.service loaded active running picoReflow Service

after reebot script should start automaticaly.
Tested on RPI zero

from picoreflow.

chron0 avatar chron0 commented on July 25, 2024

I suppose Raspbian is using systemd now, so the provided init script wont help much. I've looked thru the forks and so far it seems no one has provided a systemd unit file :) I could write one blind but without the ability to test it wont make much sense and is likely not to work properly the first time.

Have a look at https://github.com/torfsen/python-systemd-tutorial

it shouldnt be too hard, and if it works for you, please send a PR or comment your unit file here and I'll add it into the lib/init folder.

from picoreflow.

chron0 avatar chron0 commented on July 25, 2024

<3 - thx for sharing

from picoreflow.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.