ulix
Posts: 72
Joined: Sat Apr 14, 2012 6:11 pm

After startup raspistill won't safe images

Mon Sep 12, 2016 1:57 pm

Hi,
why is raspistill not saving images to the place I wrote in local.rc?
See my code..., when used in the command line it works :cry:

Code: Select all

  GNU nano 2.2.6                                                        Datei: rc.local                                                                                                                         

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi

mkdir /home/pi/tl/$(date '+%d-%b-%Y')
sudo raspistill -n -o /home/pi/tl/$(date '+%d-%b-%Y')/p%04d.jpg -t 4000000 -tl 45000
exit 0


thank you

User avatar
nl3prc
Posts: 160
Joined: Sun Jul 24, 2016 12:39 pm
Location: Den Helder the netherlands

Re: After startup raspistill won't safe images

Mon Sep 12, 2016 3:11 pm

Check your logs in /var/log
But I think that your rc.local script runs to soon
N

ulix
Posts: 72
Joined: Sat Apr 14, 2012 6:11 pm

Re: After startup raspistill won't safe images

Mon Sep 12, 2016 3:14 pm

Hi,
well which log file? I did look, but found nothing.
How can I start it later? How long do I have to wait?

User avatar
nl3prc
Posts: 160
Joined: Sun Jul 24, 2016 12:39 pm
Location: Den Helder the netherlands

Re: After startup raspistill won't safe images

Mon Sep 12, 2016 3:47 pm

Make a file
sudo nano yourfile
Make your text in the file
Ctrl x to exit and y to confirm that you want to save the file

Code: Select all

#!/bin/bash
#
mkdir /home/pi/tl/$(date '+%d-%b-%Y')
sudo raspistill -n -o /home/pi/tl/$(date '+%d-%b-%Y')/p%04d.jpg -t 4000000 -tl 45000
# 
sudo chmod 755 yourfile
Then put the file in /etc/init.d
sudo update-rc.d youfile defaults 95 5

ulix
Posts: 72
Joined: Sat Apr 14, 2012 6:11 pm

Re: After startup raspistill won't safe images

Mon Sep 12, 2016 9:50 pm

got it working with the command sleep!
Thanks a lot!

Return to “Troubleshooting”