Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • 0
deace_nuts

Can I autorun a program?

Question

4 answers to this question

Recommended Posts

  • 0
On 8/17/2017 at 4:07 PM, CocoVanChoco said:

Ofcourse,

Edit /etc/rc.d -> enabled = {}  -> enabled = {"yourprogramhere"}

 

So if my program is named door.lua and it's located in /home, I would do...

 Edit /etc/rc.d -> enabled = {}  -> enabled = {"door.lua"}

Is that correct? If so it's not working, so I must have done something wrong.

Link to post
Share on other sites
  • 0

The files need to be under /etc/rc.d to be runnable as a service. You may want to look at some services on here as examples on how to structure your program to work with rc.

Here's a good one.

Basically you need:

  • A 'start' method
  • A 'stop' method

These can run pretty much anything, but using events should work.

As for the door control thing, you may want to look at my Proximity Door Daemon, which allows for automatic doors using motion sensors. It's also extensible and very configurable.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.