All Questions
Tagged with shell-script debian
161 questions
1
vote
1
answer
116
views
Execute a script at startup as a root that executes a software an keep it running
If executed manually with sudo, the script does its job.
#!/bin/bash
echo "Script executed at $(date)" >> /var/log/realtimesync.log
echo
/opt/FreeFileSync/RealTimeSync /mnt/harddrive/...
0
votes
0
answers
25
views
Stop network connection from being brought up with NetworkManager-dispatcher pre-up
I am running NetworkManager on Debian 11. I have a script that is activated by NetworkManager dispatcher on pre-up. It has been running fine so far and now I would like to add another piece of ...
1
vote
1
answer
87
views
How can a bash script determine how it was started? [duplicate]
I am running various scripts on Debian 12.X currently with the following bash:
GNU bash, version 5.2.15(1)-release (x86_64-pc-linux-gnu)
I have the following methods/options to execute the script.
...
4
votes
2
answers
437
views
Why in my script I am unable to put multiline text changelog entry upon debian?
I am automating version bumping of my project with this bash script:
#!/usr/bin/env bash
CHANGELOG="Changelog.md"
DEBIAN_CHANGELOG="debian/changelog"
UPSTREAM_VERSION=$(cat ...
0
votes
1
answer
68
views
Looking for slideshow utility with custom/configurable randomisation
I'm looking for a way to provide custom/configurable randomisation to a slideshow tool like impressive or feh (something lightweight I can run automatically at startup). Basically I need to weight ...
0
votes
2
answers
100
views
How check if new packages are available in Debian 12 without root privilegies
I know how check if new packages are available with root privilegies. But how can I do it from shell script without sudo or editing sudoers.
I'm using Debian 12 with openbox.
Thanks!
PS. I know about ...
0
votes
0
answers
66
views
How to run script ONLY when trigger on wired and wifi?
I read a lot of examples on the internet. I put the script
/etc/NetworkManager/dispatcher.d
/etc/NetworkManager/dispatcher.d/pre-up.d
but the script does not work, that I want.
I want a script to ...
0
votes
0
answers
69
views
How to delay/pause/sleep on boot screen?
I'm using raspberry pi5 with debian bookworm.
I created a bash script and execute it on bootscreen.
The script has 100 seconds delay in it but no effect in boot screen.
The OS starts like there were ...
0
votes
0
answers
654
views
Running apt-get update in Debian Docker container hangs on installing bookworm
This is probably the strangest error I've run into.
So I'm running a Wikibase Docker setup on a Windows machine. The Docker containers are all Debian OS.
In order to install some packages upon setting ...
1
vote
3
answers
142
views
why my shell script generates zombies and sometimes works weird
I have a simple script for the i3 window manager that shows an i3bar at the bottom of the screen when you touch its edge with the mouse. It almost always works fine. However, after it quits, there is ...
2
votes
4
answers
2k
views
How to POSIX-ly ignore "warning: command substitution: ignored null byte in input"?
Today, I was working with my Raspberry Pi 4 with Debian 12 Bookworm, and I found it odd, that some system text files, namely I needed these two:
/sys/firmware/devicetree/base/model
/sys/firmware/...
1
vote
1
answer
171
views
Shell script to run command and show output in notification box
I have command line utility that generates text strings, by running a command within the directory:
./Utility -P
it prints output on terminal. How to make a shell script showing the generated string ...
1
vote
1
answer
863
views
What is the equivalent of `localectl set-keymap` command on Debian?
I am porting a shell script written for Arch to Debian.
The relevant part:
keymaps=$(localectl list-keymaps)
if test -n "${1}" && localectl list-keymaps | grep -q "${1}"
...
0
votes
2
answers
163
views
Script to execute a task when certain TCP traffic appears (Raspberry Pi OS Bookworm)
I am using a Raspberry Pi as a Wifi bridge in my kitchen at home to bring network connectivity to a device that only has ethernet.
I used a Will Haley guide and it works great. That part is solved ...
0
votes
1
answer
252
views
shell .sh script does not execute all tasks within, except when run manually [duplicate]
I run a shell script at reboot, by having it in my crontab:
@daily apt-get update && apt-get upgrade -y
@reboot bash /root/Start.sh
@reboot /bin/bash -c 'sleep 10 && /bin/mount -a'
...
...