LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   How i do create autostart script for UpStart ? (https://www.linuxquestions.org/questions/programming-9/how-i-do-create-autostart-script-for-upstart-826068/)

wertum 08-13-2010 03:11 PM

How i do create autostart script for UpStart ?
 
How i do create autostart script for UpStart ?

I want autostart this commands with UpStart:
mkdir /home/user/_1_
mkdir /_1_

p.s: ... or give me links for FAQ's

frankbell 08-13-2010 09:59 PM

Machtelt Garrels writes great manuals.

http://tille.garrels.be/training/bash/

Probably all you need is this, based on your original post. You need to tell the script where to find bash:

Code:

#!/bin/bash
mkdir /home/user/_1_
mkdir /_1_


I've written only a few scripts and most of them are just "do this," then "do this," and so on.

One lesson I have learned is to test the commands, write the script, then test the script. And test the script. And test the script.

Klaatu did a great tutorial on bash scripting in his July 12, 2010, podcast. Unfortunately, he doesn't provide a way to link to specific episodes, but here's his website. Look for episode 5x16.

grail 08-13-2010 11:37 PM

Do you actually need this to be carried out regularly? If you place a script that can be read by upstart it will need to be associated
with an event. However if it is just something to be done once you login then place it in your .bash_profile


All times are GMT -5. The time now is 03:54 AM.