Autostart script

Ronny Nilsson rln-nard at arbetsmyra.dyndns.org
Wed Mar 4 12:26:57 CET 2020


Hi
Here are some suggestions:
* Check that you script/program has the executable permission mode set.
* The programs in /etc/network/if-up.d/ are expected to run for a short time 
only. If you program need to persist long it needs to fork into background 
and become a deamon somehow. There are multiple methods for how to solve 
this, start-stop-daemon is just one method. But with start-stop-daemon, try 
adding the "-b" option.
* There are several scripts in /etc/network/if-up.d/ by default, copy one of 
the existing and modify it to match your needs.

The /boot/settings is active yes. When it runs it generates a script 
into /etc/cron.weekly/example which in turn runs once a week. You probably 
have the same mechanism in you Linux desktop PC. The example prints "Hello 
World" to the syslog, which you read with the "logread" command. If you
	cp /etc/cron.weekly/example /etc/cron.minutely/
you will get the same message once per minute as well (easier to debug).

Midnight Commander is available indirectly. It can be installed via the Debian 
add-on. Just add
	deb_install += mc
	deb_install += mime-support
to your debian.config

Nice that you time zone work now. :)

Get back to me again if there are problems.
/Ronny



------------------------------------------
> Ronny
>
> I am unable to make an autostart script run.
>
> You wrote:
> Additionally there is a "autostart at network" as well; programs in
> /etc/network/if-up.d/ are started when a network interface becomes ready.
>
> Should I use an ordinary script or an rc.my_product with
> start-stop-daemon? My script is not a daemon.
>
> When I run the following manually, all is ok, i.e. the RPI connects to
> an upward server:
>  /etc/network/if-up.d/rc.my_product start
> But it never runs on start up.
>
> Any suggestion welcome.
>
> ===
> Is rc.local file in /boot/settings active? should I see an Hello weekly?
> Where?
>
> Where does logger write? in syslog accessible through
> make ssh b8:27:eb:07:a6:b2 /sbin/logread ?
>
> Having midnight commander available would help my productivity!
>
> Last fall, I reported trouble getting the proper time zone. I noted
> after a power failure that my router was rather slow and replaced it. My
> ISP also improved its DNS. I now usually have the proper local time and
> won't search further.
>
> Thanks again.
>
>  ~ Gilles



More information about the Nard mailing list