Re: running a specified binary across reboots

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 08, 2014 at 12:28:25PM +0300, Kevin Wilson wrote:
> I want to run a binary of some Fedora application I wrote immediately
> after reboot.
> 
> I know that as a workaround I can wrap it as a systemd daemon, but I
> prefer not to.

You don't need to wrap it in anything -- whatever legitimate complaints
there can be, simply running a binary or script is really easy. You just
need something like:


[Service]
Type=oneshot
ExecStart=/usr/local/bin/whatever

[Install]
WantedBy=default.target

(If this is a long-running daemon, possibly "Type=forking" or "Type=simple"
-- and simple is the default so you can leave that off.)


But as Ed noted, if you don't want to do that, you can use
/etc/rc.d/rc.local.


Or, particularly if you want this to run as a non-root user, you can use
"@reboot" in cron. This replaces all of the other time specifiers, so, like
this:

@reboot /usr/local/bin/whatever

> What is a good practice to achieve it in Fedora 20 ? there is no
> /etc/rc.local in my fedora 20, and trying to add an entry in
> /etc/rc.local does not cause it be be run across boots.

It's a little unfortunate that we don't support the traditional file
location, but, there we are.
-- 
Matthew Miller
<mattdm@xxxxxxxxxxxxxxxxx>
Fedora Project Leader
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux