What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

how to autostart a python server script ?

adrianmak

Occasional Visitor
I have a server python script.
How to auto execute this script for each reboot?

I added the python command in this file /jffs/scripts/post-mount

Code:
#!/bin/sh

if [ $1 = "/tmp/mnt/sda1" ]
then
  ln -sf $1/entware /tmp/opt
  python /mnt/sda1/py/server.py
fi

After rebooting the router and ssh for checking running process with ps command,
no "python /mnt/sda1/py/server.py" is running.

My router is asus n66u
 
Last edited:
I have a server python script.
How to auto execute this script for each reboot?

I added the python command in this file /jffs/scripts/post-mount

Code:
#!/bin/sh

if [ $1 = "/tmp/mnt/sda1" ]
then
  ln -sf $1/entware /tmp/opt
  python /mnt/sda1/py/server.py
fi

After rebooting the router and ssh for checking running process with ps command,
no "python /mnt/sda1/py/server.py" is running.

My router is asus n66u

http://www.snbforums.com/threads/godday-ddns-python-script-will-this-execute.23428/#post-172919 :rolleyes:
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top