Re: custom startup script

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

 






On Wed, Jul 10, 2013 at 9:39 AM, Reindl Harald <h.reindl@xxxxxxxxxxxxx> wrote:


Am 10.07.2013 18:25, schrieb Jerome Yanga:
> On Wed, Jul 10, 2013 at 9:19 AM, Jerome Yanga <jerome.yanga@xxxxxxxxx <mailto:jerome.yanga@xxxxxxxxx>> wrote:
>
>     Hi all!
>
>     In the past, I would create custom startup scripts and create a link in the /etc/rc.d/rc5.d/ directory.
>
>     Is this still a good practice?  If not, please let me know where I should put my custom startup scripts.

bad practice these days, systemd-units are much more powerful
and for oneshot-scripts mostly simpler in the syntax as
the sysv-init stuff

http://0pointer.de/public/systemd-man/systemd.service.html
http://0pointer.de/public/systemd-man/systemd.unit.html
http://0pointer.de/public/systemd-man/systemd.exec.html

systemctl --help
man systemctl
________________________

example below enabled with "systemctl enable network-bonding-bridge.service"

[root@rh:~]$ cat /etc/systemd/system/network-bonding-bridge.service
[Unit]
Description=Network Bonding Bridge
After=network.service
Before=vmware.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/local/bin/bondig-bridge.sh start
ExecStop=/usr/local/bin/bondig-bridge.sh stop

[Install]
WantedBy=multi-user.target


Thank you, Reindl.

j
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
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