Koozali.org: home of the SME Server

Simple way to run one time task at startup?

Offline gbentley

  • *****
  • 482
  • +0/-0
  • Forum Lurker
    • Earth
Simple way to run one time task at startup?
« on: May 30, 2013, 10:02:30 AM »
I used to use a symlink for my centralised kaspersky signatures on SME - now, using 'mount --bind' I need this to run at startup and for life of me can't get 'mount --bind' to work in fstab? Maybe thats two questions :)
"If you don't know what you want, you end up with a lot you don't."

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Simple way to run one time task at startup?
« Reply #1 on: May 30, 2013, 11:58:01 AM »
could you please be more verbose and explain your problem and not your solution?

thank you

Offline mmccarn

  • *
  • 2,651
  • +10/-0
Re: Simple way to run one time task at startup?
« Reply #2 on: May 30, 2013, 02:16:58 PM »
I run commands at startup by adding them to the 'local' event as described here:
http://wiki.contribs.org/Mount_Network_Shares#Modify_the_SME_local_event

Offline gbentley

  • *****
  • 482
  • +0/-0
  • Forum Lurker
    • Earth
Re: Simple way to run one time task at startup?
« Reply #3 on: May 30, 2013, 04:47:48 PM »
tnx mmccarn - looks like just what I need :)
"If you don't know what you want, you end up with a lot you don't."

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Simple way to run one time task at startup?
« Reply #4 on: May 30, 2013, 06:24:46 PM »
gbentley

There is also a simple example of adding a script to
/etc/rc.d/rc.local
here
http://wiki.contribs.org/Wondershaper

This will run at startup
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline gbentley

  • *****
  • 482
  • +0/-0
  • Forum Lurker
    • Earth
Re: Simple way to run one time task at startup?
« Reply #5 on: June 03, 2013, 10:25:17 AM »
Thanks Janet - that worked!

 :grin:
"If you don't know what you want, you end up with a lot you don't."

Offline mmccarn

  • *
  • 2,651
  • +10/-0
Re: Simple way to run one time task at startup?
« Reply #6 on: June 16, 2013, 02:26:36 PM »
I've also discovered that an entry in crontab beginning with "@reboot" allows you to run a command once after boot.

Offline jonnblaze

  • 1
  • +0/-0
Re: Simple way to run one time task at startup?
« Reply #7 on: July 30, 2013, 07:35:41 AM »
thank you for your help. you solve the problem and dicuss briefly
gHost rIdEr