non-compiled programs written in scripting languages (e.g. perl, python or tcl) or command line interpreters such as Unix shell.
Questions tagged [script]
248 questions
4
votes
5 answers
How do I start two different Python scripts with rc.local?
I have two different Python scripts I'd like to run at start-up on my Raspberry Pi A+. Both work perfectly if I run them via sudo python filename.py . I can get the first one to run, but not the second one in the rc.local below. It doesn't matter if…
pyreflos
- 43
- 1
- 1
- 5
4
votes
1 answer
Check for I2C device presence
I'm using I2Ctools to read data off of some devices attached to a raspberry pi via the I2C interface. I want to check if a device in a certain address is present or not. If present, read the data from it. If not, read data off another device. Right…
Tauseef Latif
- 213
- 2
- 4
- 7
4
votes
1 answer
Can I run a LAMP server with a webmin interface on my raspberry pi on raspbian?
I would like to run a LAMP server with a webmin interface on my raspberry pi. I am running the latest Raspbian but am having trouble getting Webmin. I tried the obvious... sudo apt-get install webmin ..but it did not appear to find a package. I see…
user24221
4
votes
3 answers
How to make Raspberry shutdown when I unplug the ethernet cable
I use my Raspberry Pi Model B with Raspbian as a server and I want to know (if it is possible) how to make that the Raspberry pi send itself a halt command when I unplug the Ethernet cable (eth0) Any help will be very appreciated.
Flipacholas
- 143
- 5
3
votes
2 answers
Run script with virtualenv on init
I have bash script which loads a virtualenv and run 3 python scripts. I have tried to init on startup by ini.d and rc.local methods but it doesnt work and I have no idea why is not working but if I start it manually it works the content of run.sh is…
Jandako
- 61
- 1
- 5
3
votes
2 answers
Run a script at shutdown on Raspbian
I'm trying to run a script right before my Pi shuts down. OS: Raspbian Stretch Here is what I did so fare: put my script (name: sendir) in /etc/init.d/ created a symbolic link to it in /etc/rc6.d with the name K99sendir The script is executable and…
apfelcast
- 73
- 1
- 3
- 9
3
votes
2 answers
Run script or command after boot
I need to run sudo mount -a after boot since auto mount of the share doesn't happen as needed ( /etc/fstab contains the right code for that ). How can I do this on Jessie Pixel?
guyd
- 598
- 3
- 14
- 29
3
votes
2 answers
Raspberry Pi not loading bashrc
I recently bought and set up my Raspberry Pi 3.0 with Raspbian PIXEL. I use the default shell, bash. Upon login, bash does not automatically execute my ~/.bashrc script. Every other Linux distro I've run does this automatically, so I'm at loss to…
MD XF
- 133
- 1
- 5
3
votes
3 answers
How do I add a task to Crontab
I am making a program for the Raspberry Pi to use, as part of its installation, it need to add a task to crontab so that it will run on bootup. I know if I type in crontab -e then add the line "@reboot file/to/program" to the bottom it will do it.…
user5062278
- 31
- 2
3
votes
1 answer
Script Installation Problems RP 2 | iojs | node | npm
I am trying to install this Script on my RaspberryPi 2 with wheezy on it. I think I am having problems installing npm. Here is the script : if [[ "$USER" != 'root' ]]; then echo "Sorry, you need to run this as as root" exit fi apt-get update apt-get…
dash199t
- 31
- 2
3
votes
3 answers
How do I delay transmission-daemon startup until all shares are mounted?
I've installed transmission-deamon on Raspbian. I've set it up to directly download on to a NAS share, which is mounted at /home/pi/nas/public via CIFS in /etc/fstab . All this generally works fine, except when the Pi restarts - either due to a…
aalaap
- 244
- 5
- 13
3
votes
1 answer
How to turn monitor on/off? vcgencmd doesn't know about display_power
In times past, I used tvservice to turn the monitor on/off in a script. Now I understand vcgencmd is the current method. I'm running RPi OS 12.4 on a 4GB RPi 5. I installed lib-rasbperrypibin. vcgencmd and the man page refers to the display_power…
raindog308
- 131
- 1
- 2
3
votes
1 answer
Rotate screen 180 on the fly?
I think this may be impossible, but I'd like to rotate the display by 180 degrees on the fly, triggered by a button connected to the input pins. I built a cocktail-style MAME cabinet (RetroPie) but not all games have native support for cocktail…
user2744010
- 133
- 2
3
votes
1 answer
Include File With Raspbian Setup
I am working on a project which requires many raspberry pi's to be set up pretty much the same way. In order to set up the pi's we put NOOBS on the micro SD card and then install raspbian onto the pi. We then go through a series of steps where we…
Lucas
- 31
- 1
2
votes
4 answers
Pi - own python startup script in the wrong order
I've written a python script to connect to mysql & insert the current time then close. The use case is if my Pi browns out/restarts (often does) the time of this event will be logged. The script works just fine when called in command line. I put the…
Brian
- 43
- 2