top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Fedora: how to use a systemd service, without making it persistent ?

0 votes
346 views

I want to start a systemd service (dhcpd) , but only if a link to the internet is present. I don't want the service to start on boot.

systemctl start doesn't work unless the service is enabled.

This works, but it's very kludgy:

if 
    * 
 systemctl enable 
 systemctl start 
 systemctl disable 
fi

Any better ideas ?

posted Apr 9, 2018 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

I want to start a systemd service (dhcpd) , but only if a link to the internet is present. I dont want the service to start on boot.
There are multiple ways to start a service, you can google that...

systemctl start doesnt work unless the service is enabled.
If thats the case, something is wrong, you should be able to start a service even if its not enabled.

answer Apr 9, 2018 by Sumit Pokharna
Similar Questions
+1 vote

What kind of secret voodoo does one need to use rsyslog on a systemd system? Is it even possible?

I have installed it, and I only get kernel boot messages in /var/log/messages.

I find journalctl to be fundamentally braindead, lacking features which we have taken for granted for decades in redhat/rhel/fedora/centos. (Seriously, whats the wisdom of keeping ALL logs around forever?, and in an easily corruptible format).

I found something on the fedora web site which said to just install rsyslog. Which seems to be obsolete or invalid.

+1 vote

I'm running Fedora-24(beta)/KDE, and sendmail/email (through KMail) is failing.
When I try to send email I get the warning "Failed to transmit message", and journalctl has the entry
"sendmail.service: PID file /run/sendmail.pid not readable (yet?)
after start: No such file or directory".

I've checked, and sendmail.pid is in place:

$ sudo cat /run/sendmail.pid 
2829 
/usr/sbin/sendmail -bd -q1h 

Googling for the journalctl entry, I see people have been encountering this problem for years. But I haven't seen any solution offered. Several of the comments suggest that it is a systemd problem.

please help?

+1 vote

On Fedora 19, the packagekit daemon runs once in while in the background. Can somebody please inform me about the systemd service that is responsible for spawning the packagekit daemon?

0 votes

Where does dnf keep its repo configuration, or does it use /etc/yum.repo.d? Which I see is still there. As I want to change it to
use my local repos.

+1 vote

Any idea why yum doesn't show by default from what mirror it is downloading from?

...