Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 9th January 2012, 01:07 PM
yaxattax Offline
Registered User
 
Join Date: Dec 2011
Posts: 51
linuxfirefox
F16 Startup script

Hi all,

I'm trying to run a script at startup. I've read a lot about the systemd way and it seems that it is the new way to do things, since I can't seem to get a sysV init script working at all.

The problem I have with the systemd way, is that it is a script that spawns a process, and the script itself then dies. If invoked from command line it works fine, but for some reason systemd takes the death of the top level script as a sign to stop all the child processes, which I do not want. How can I signal in the service file that the children processes should be allowed to persist?

Kind regards,

Yaqub
Reply With Quote
  #2  
Old 9th January 2012, 01:34 PM
stevea's Avatar
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,300
linuxfedorafirefox
Re: F16 Startup script

Post your systemv script. We can't just guess at what is wrong.
Did you use the 'daemon' shell function ? Did you start in the background or w/ nohup ? Does he process close the terminal stdin/stdout/stderr to avoid the sighup ?
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
Reply With Quote
  #3  
Old 9th January 2012, 04:10 PM
yaxattax Offline
Registered User
 
Join Date: Dec 2011
Posts: 51
linuxfirefox
Re: F16 Startup script

I'm not interested in getting a sysV script working. I've read about a lot of problems of broken sysV scripts due to systemd, and a much simpler "fix" than fiddling around with broken sysV init scripts would simply be to add it to my bashrc. I want to know if I can stop the processes from dying when the start script has finished.

In case I misunderstand you, and you wanted to know what my systemd service file was:

Quote:
[root@fedora16-yax:/home/yaxattax/tmp]# cat /etc/systemd/system/TMW_lmgr.service
[Unit]
Description=The Mathworks FlexLM Licence Server

[Service]
ExecStart=/etc/init.d/flexlm start
ExecReload=/etc/init.d/flexlm stop
ExecReload=/etc/init.d/flexlm start
ExecStop=/etc/init.d/flexlm stop

[Install]
WantedBy=multi-user.target
WantedBy=graphical.target
[root@fedora16-yax:/home/yaxattax/tmp]#


---------- Post added at 04:10 PM ---------- Previous post was at 01:46 PM ----------

I found the solution:

Code:
[Unit]
Description=The Mathworks FlexLM Licence Server

[Service]
RemainAfterExit=yes
ExecStart=/etc/init.d/flexlm start
ExecReload=/etc/init.d/flexlm stop
ExecReload=/etc/init.d/flexlm start
ExecStop=/etc/init.d/flexlm stop

[Install]
WantedBy=multi-user.target
WantedBy=graphical.target
The difference is the following line:
Code:
RemainAfterExit=yes
I found another option:
Code:
Type=oneshot
But that seemed to cause my service to throw an error
Reply With Quote
Reply

Tags
f16, script, startup, systemd

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Where do I put my startup script? simpleblue Using Fedora 0 3rd December 2011 03:15 AM
script to use at startup pmorg Programming & Packaging 2 22nd July 2011 04:48 AM
smb startup script crab_com Using Fedora 0 18th February 2009 04:47 AM
How can I set startup-script? youhaodeyi Using Fedora 2 22nd October 2007 07:43 AM
How to run a script on startup nemesys Using Fedora 0 19th November 2005 04:31 PM


Current GMT-time: 19:43 (Monday, 20-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat