Koozali.org: home of the SME Server

Launch startup script

Offline simone686

  • ***
  • 71
  • +0/-0
Launch startup script
« 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

Online ReetP

  • *
  • 3,722
  • +5/-0
Re: Launch startup script
« Reply #1 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.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline bunkobugsy

  • *
  • 274
  • +4/-0
Re: Launch startup script
« Reply #2 on: October 28, 2022, 08:34:17 AM »
Why not use /etc/rc.d/rc.local ? I works for me...

Offline mmccarn

  • *
  • 2,626
  • +10/-0
Re: Launch startup script
« Reply #3 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.

Online ReetP

  • *
  • 3,722
  • +5/-0
Re: Launch startup script
« Reply #4 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 :-)
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation