What's new

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:
 

Latest 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