Hot answers tagged

2

I am not really sure about the systemd internal workings, but I was able to connect to my SANE server-side scanner from client computer after running this: sudo systemctl start saned.socket I assume it might be even the correct way to start it, judging by description here: - ...


2

Instead of using /etc/rc.local for long-running services, create a systemd service. As an example, create /etc/systemd/system/foo.service, containing: [Unit] Description=Foo [Service] Type=simple ExecStart=/usr/bin/sleep 10 Restart=always [Install] WantedBy=default.target This creates a service that will restart the command when it dies. Replace ...


1

To run Jenkins every time you restart the server with the option to relax the content security policy, run it as a service with the options you require. Download jenkins.war file to any convenient destination, eg. /home/jenkins_user Create service file /etc/systemd/system/jenkins.service specifying the relaxed security policy Reload service manager: ...


1

Even if this answer is already ~2-3 years old, I want to add some useful information. Obviously, the accepted answer is correct but does not answer how to perform a "safe" shutdown of the service (rtorrent) with a, e.g., systemctl service script. Most of the existing answers or scripts "kill", e.g, the screen session or the rtorrent process itself. Thus, ...


1

Here are two examples from the Upstart Cookbook: To start a job when eth0 is available start on net-device-up IFACE=eth0 To start once a non-loopback device has come up: start on net-device-up IFACE!=lo Note: net-device-up is not a regular job, it's an "Ubuntu well-known event".



Only top voted, non community-wiki answers of a minimum length are eligible