Re: running start-up script using systemd

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

 



On Mon, 2019-01-14 at 00:59 +0530, Danishka Navin wrote:
> Hi,
> 
> I have written a script which suppose to run at start-up and set a
> given IP.
> I can see systemd service is running when I check the status but I
> can find the expected result (new IP).
> 
> Is there anything wrong with the following format of the service
> file?
> 
> [Unit]
> Description=Config IP
> ConditionFileIsExecutable=<path_to_script>/script
> After=network.target
> StartLimitIntervalSec=0
> 
> [Service]
> ExecStart=<path_to_script>/script
> 
> [Install]
> WantedBy=multi-user.target
> 
> Is it ok to restart network service with the script I use?

Systemd won't let you run 'systemctl restart ...' inside of a service
script.  It's an attempt to avoid infinite loops, I think.

The last time I tried that I had to modify my script to nohup, sleep,
and then call systemctl.
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[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