Questions tagged [systemd-unit]

Using Unit files from systemd.

Filter by
Sorted by
Tagged with
1 vote
1 answer

.service or crontab for shell script calling python-CLI app and/or python script failing

This isn't necessarily a Pi-specific question, but might be applicable to general Linux. However, my hunch is that the Pi's uniqueness might have something to do with it. I'm trying to run two scripts ...
nikUoM's user avatar
  • 113
1 vote
2 answers

Raspbian Stretch unable to start SSH on boot: Problem starting ssh on boot exit 255 when executing ssh -D $SSHD_OPTS?

When I boot my Raspberry pi running Stretch 9, the syntax checks out alright, but when it goes to start the following error is what it gets: pi@hostname:~ $ sudo systemctl status ssh.service * ssh....
leeand00's user avatar
  • 704
2 votes
2 answers

How to run a script after bootup on RPi 4/Raspbian 10 (buster)

Im trying to run a script after bootup, when the desktop is shown. The script is rather simple: #!/bin/bash mkdir /home/pi/Desktop/test So in other words: This script is creating af folder "Test" ...
jrn6270's user avatar
  • 143
1 vote
1 answer

Refreshing lxsession kodi-standalone exit

I'm having difficulties refreshing a screen after kodi-standalone exits. I have a stretch-lite RPI2 installation and starting kodi from command line (with LXDE xserver gui present) mrkipi@raspberrypi:...
user2424175's user avatar
0 votes
1 answer

Restart wifi using bash script and systemd service?

My rpi is connected to a captive portal hotspot. I have prepared a python login script to login to the captive portal and it was working fine. But sometimes the wifi is getting disconnected and at ...
mcv's user avatar
  • 73
1 vote
1 answer

Arecord: "main:828: device or resource busy" when run via systemd service, but works fine from CLI

I have a python script which, when a GPIO button is pressed, launches an arecord process. This records audio from a USB microphone (plughw:CARD=GS3,DEV=0) and pipes it to another program for ...
Micah Vertal's user avatar
2 votes
1 answer

Disable logging of dotnet core console output

I have a dotnet core application that is executed by a systemctl service. In normal operation it will always execute in this context. However the application may also be executed manually by the user ...
Fuzzytrooper's user avatar
0 votes
2 answers

How to make a service to run a python script which includes browser automation

I have python script which is using selenium web driver to do some web automation task. This python code is running perfectly fine when I am running it from the terminal. It launches firefox and does ...
S Andrew's user avatar
  • 460
3 votes
2 answers

Cleanly shutting down daemon on Reboot or Shutdown command

I have a daemon I've created which fires up a bunch of subcomponent threads. If I use the "systemctl stop" command I catch the SIGTERM and usually have everything closed down cleanly in 2-6 seconds (...
Chrisby's user avatar
  • 31
2 votes
2 answers

Python script does not run when called by service

I have written a python program that continuously parses my current IP and emails it to me if it changes that I want to begin running as soon as the computer boots up: /home/pi/ that ...
Arik Rundquist's user avatar
7 votes
3 answers

Running a script after an internet connection is established

I am trying to run a very small python script AFTER internet has been established. I am currently editing /etc/network/if-up.d/upstart by adding the following code directly under all_interfaces_up(): ...
user8951490's user avatar
10 votes
2 answers

How to exit a python daemon cleanly?

I want a simple python script to run in background, therefore I configured daemon test.service in /etc/systemd/system/. [Unit] Description=Test service [Service] Type=simple ...
EarlyEarl's user avatar
  • 103
3 votes
1 answer

systemd never perform StartLimitAction (reboot) after service fails

I facing the same problem (which is similar to, having following service. I ...
Tomas Bilek's user avatar