I've a simple script in /etc/init.d, named example (I'm on OpenWrt):
#!/bin/sh /etc/rc.common
# Example script
# Copyright (C) 2007 OpenWrt.org
START=10
STOP=15
start() {
mkdir /tmp/test
}
stop() {
echo stop
# commands to kill application
}
I'm capable to start it at the boot (I verify that the test directory is created in tmp). But how to call a python program located in /mnt? I've tried:
#!/bin/sh /etc/rc.common
# Example script
# Copyright (C) 2007 OpenWrt.org
START=10
STOP=15
start() {
python3 /mnt/program.py
}
stop() {
echo stop
# commands to kill application
}
but I had to reset the device because it couldn't boot...Why? What am I doing wrong?