LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-31-2017, 01:56 AM   #1
validator456
Member
 
Registered: Apr 2013
Location: Rotterdam, The Netherlands
Distribution: Crunchbang Linux
Posts: 234

Rep: Reputation: Disabled
Trying to create startup script


I have been trying to create a startup script called startup.sh.
The script itself is very simple
Quote:
#!bin/bash

echo "The date of today";date
Easy enough, execpt that it doesn't work. Placed the script in: /etc/init.d./

I ran the command: sudo chmod +x startup.sh.

And rebooted: sudo reboot now. And nothing happens....

Should be simple. Can anyone help me out?
 
Old 12-31-2017, 02:35 AM   #2
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
Probably you didn't add your script to any runlevel, so it doesn't start?

Last edited by Teufel; 12-31-2017 at 02:36 AM.
 
Old 12-31-2017, 02:58 AM   #3
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
init.d just holds the scripts. You have to add symlinks to the run level you want it to execute in. https://shabirimam.wordpress.com/200...p-or-shutdown/
 
Old 12-31-2017, 03:15 AM   #4
validator456
Member
 
Registered: Apr 2013
Location: Rotterdam, The Netherlands
Distribution: Crunchbang Linux
Posts: 234

Original Poster
Rep: Reputation: Disabled
Yes, I didn't do that. I will give it a try.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Create Startup Script in Angstrom spudgunner Linux - Software 6 01-27-2012 11:13 PM
how to create startup script? samengr Linux - General 7 04-15-2008 08:44 AM
Create new script that runs on startup pnellesen SUSE / openSUSE 1 01-23-2007 08:29 PM
How Do I Create A Startup Script? joany MEPIS 21 11-30-2006 04:43 PM
newbie - how to create a startup script gogogadgetearl Linux - Software 2 10-02-2005 08:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration