LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-09-2016, 02:13 AM   #1
hack3rcon
Member
 
Registered: Jan 2015
Posts: 928

Rep: Reputation: Disabled
Post Run a script at startup.


Hello.
I created a script in "/etc/init.d" with the name "my.sh" and add below lines to it :
#!/bin/sh
systemctl start network

and after it I execute "chmod +x my.sh" and also create a link of my script in "/etc/rc.d" too but after I rebooted my Fedora the script can't executed.

Any idea?

Tnx.
 
Old 07-09-2016, 02:33 AM   #2
hack3rcon
Member
 
Registered: Jan 2015
Posts: 928

Original Poster
Rep: Reputation: Disabled
Problem Solved when I created a "rc.local" file under "/etc/rc.d" and put my command to it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Need to run script at startup. pinga123 Linux - Newbie 6 02-04-2010 12:05 PM
'cannot stat' script in /etc/rc.d/, try to run script at startup quintan Linux - Software 1 11-21-2005 03:53 AM
'run as' from rc.5 startup script davee Linux - General 2 03-10-2005 03:36 AM
Run a script at startup iain.ross Linux - Newbie 8 08-27-2004 05:03 PM
How to run script on startup Angelis Linux - General 1 11-16-2003 06:45 AM


All times are GMT -5. The time now is 08:34 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration