Skip to content

Tag: systemd

Converting watch into a unit file systemd

I’ve got a shell script as follows ss.sh The requirement is that I need to use this script with the watch command. And I’d like to make this into a systemctl service. I did it as so. sc.sh And in my /etc/systemd/system, log_info.service When I run systemctl start log_info.service, It runs but not …

Detect IP-Address change on an interface

I would like to trigger a service when a change of an ip address on a specific interface occurs. Is there a target for this or some other method I am not aware of to achieve this using systemd on Linux (Kernel 3.19)? The service would be used to send a SIGNAL to a defined process. The Linux is running

Bash Brace Expansion in Systemd ExecStart

The following test is in CentOS 7.1. Create the following file test.service in /usr/lib/systemd/system/ and execute systemctl daemon-reload; systemctl restart test; systemctl status test -l There is no output of the value as the ${a} does not substitute as the word hello world, until it is changed echo ${a} i…

Trigger CURL Request after boot using systemd

I’m trying to create a service that will trigger every time a raspberry pi boots. Currently the service runs a really simple script that sends a POST request to a web service endpoint I control. I can trigger said script manually and that part all works perfectly. I’m struggling with the next step…