An approach to initialize a linux running machine using web2py

43 views
Skip to first unread message

Aydin S

unread,
May 20, 2015, 3:28:37 PM5/20/15
to web...@googlegroups.com
I want to initialize a few things on a linux machine running web2py server.  Meaning that a init.py file to be run in the boot, things initilized in init.py will be used in web2py environment, can scheduler do it? If so, I should set the number of repeats to 1? 

Dave S

unread,
May 20, 2015, 3:45:10 PM5/20/15
to web...@googlegroups.com


On Wednesday, May 20, 2015 at 12:28:37 PM UTC-7, Aydin S wrote:
I want to initialize a few things on a linux machine running web2py server.  Meaning that a init.py file to be run in the boot, things initilized in init.py will be used in web2py environment, can scheduler do it? If so, I should set the number of repeats to 1? 

Are you specifically interested in setting environmental variables, or making links, or doing something like generating index files on the DB, or maybe generating new content (for example, making PDF files from some nightly update)?

/dps

Aydin S

unread,
May 20, 2015, 4:56:50 PM5/20/15
to web...@googlegroups.com
I'm trying to set a GPOI pin to be output. I do not want to repeat this, I want this to happen only one time like (set pin 10 to output). And I want this to happen only every time web2py is started. Thanks.

Dave S

unread,
May 20, 2015, 5:50:11 PM5/20/15
to web...@googlegroups.com


On Wednesday, May 20, 2015 at 1:56:50 PM UTC-7, Aydin S wrote:
I'm trying to set a GPOI pin to be output. I do not want to repeat this, I want this to happen only one time like (set pin 10 to output). And I want this to happen only every time web2py is started. Thanks.


For that, I;d make a stand-alone program to set the pin, and then a shell script to invoke that program and then start web2py.

Are you starting web2py from something in /etc, from a login script, or from an nginx configuration file?

/dps

 

Aydin S

unread,
May 21, 2015, 10:48:55 PM5/21/15
to web...@googlegroups.com
Thanks, yes the web2py is started from /etc/init.d
I wonder if I do that the imported pins will be in the web2py environment?
Reply all
Reply to author
Forward
0 new messages