Questions tagged [systemd-unit]
Using Unit files from systemd.
13
questions
1
vote
1
answer
108
views
.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 ...
1
vote
2
answers
2k
views
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....
2
votes
2
answers
1k
views
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" ...
1
vote
1
answer
165
views
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:...
0
votes
1
answer
470
views
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 ...
1
vote
1
answer
2k
views
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 ...
2
votes
1
answer
580
views
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 ...
0
votes
2
answers
592
views
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 ...
3
votes
2
answers
688
views
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 (...
2
votes
2
answers
6k
views
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/sendIP.py#note that ...
7
votes
3
answers
30k
views
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():
...
10
votes
2
answers
8k
views
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
After=multi-user.target
[Service]
Type=simple
...
3
votes
1
answer
3k
views
systemd never perform StartLimitAction (reboot) after service fails
I facing the same problem (which is similar to https://stackoverflow.com/questions/41908660/systemd-always-have-a-service-running-and-reboot-if-service-stops-more-than-x), having following service. I ...