Koozali.org: home of the SME Server

Other Languages => Italiano => Topic started by: simone686 on October 27, 2022, 02:48:19 PM

Title: Launch startup script
Post by: simone686 on October 27, 2022, 02:48:19 PM
Hi all

i have created a custom bash script and i wish i could launch it on boot....

normally i edited /etc/crontab or crontab -e     @reboot /yyy/zzz/abc.sh

is there a safe ways to do this ?

Thanks
Title: Re: Launch startup script
Post by: ReetP on October 27, 2022, 03:57:50 PM
First, consider what you are trying to do and why.

Is it really necessary? What are you trying to achieve?

Explain a little more.

The instant answer is templates. But first think about the comments above.

Then please read the manual.

https://wiki.koozali.org/Cron_entry

https://wiki.koozali.org/Template-driven_configuration_system

https://wiki.koozali.org/SME_Server:Documentation:Developers_Manual:Chapter8

Etc.
Title: Re: Launch startup script
Post by: bunkobugsy on October 28, 2022, 08:34:17 AM
Why not use /etc/rc.d/rc.local ? I works for me...
Title: Re: Launch startup script
Post by: mmccarn on October 28, 2022, 12:56:14 PM
normally i edited /etc/crontab or crontab -e     @reboot /yyy/zzz/abc.sh

I used crontab @reboot... on SME7 - SME9 without any problems.

I am not using it on SME 10 because I have not re-established the service I was starting in SME9 - but I would expect it to work.
Title: Re: Launch startup script
Post by: ReetP on October 28, 2022, 02:12:05 PM
Still be nice to know what the OP was trying to achieve.

Often it is the start of an XY Info issue :-)