Hallo Leute,
leider habe ich ein Problem beim Autostart vom Raspberry, und auch nicht wirklich viel Ahnung
kann mir wer helfen die Datei richtig zu konfigurieren??
Auf dem Raspberry laufen zwei Programme:
- Sunwatch (Überwachung meiner PV Anlage)
- CGMiner (Leider ist der noch nicht sehr stabil mit den Antminern)
#!/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.
# But locally (for BCM 2835 ARM Linux) we...
_firstboot=false
# assume there is no /etc/hostip until we have run at least once
if [ ! -f /etc/hostip ]; then
#!/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.
# But locally (for BCM 2835 ARM Linux) we...
_firstboot=false
# assume there is no /etc/hostip until we have run at least once
if [ ! -f /etc/hostip ]; then
#!/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.
# But locally (for BCM 2835 ARM Linux) we...
_firstboot=false
# assume there is no /etc/hostip until we have run at least once
if [ ! -f /etc/hostip ]; then
# once-off initialization
echo "Welcome to Raspberry Pi - one-off initialization"
[ -x /sbin/ldconfig ] && /sbin/ldconfig
[ -x /sbin/insserv ] && /sbin/insserv networking 2>/dev/null
_firstboot=true
fi
if [ -x /boot/boot.rc ]; then
# note the user could easily try to make or edit this file in Windows
# this will give it the wrong line endings and may result in errors
# we try to discourage this my not making it a .txt file
. /boot/boot.rc
fi
. /boot/boot.rc
fi
# show the main IP address late enough in the start-up sequence for people
# to read it e.g. to be able to ssh to the system
if hostname -I > /etc/hostip; then
_IP=`cat /etc/hostip`
[ -z "$_IP" ] || echo "My network IP address is $_IP"
if ${_firstboot}; then
# Experience suggests that we are in a mess on the first boot
# (Something (ifplugd?) prevents the loopback network interface comming up)
echo "Raspberry Pi rebooting... "
echo "-- If we stop waiting for portmap feel free to turn the power off"
echo " and on again"
echo "-- (only on this reboot occasion - it is normally better to wait)"
echo "see you later."
reboot
ft
screen -S mine
cd /usr/src/cgminer
cgminer -c /home/pi/cgminer.conf --quiet --usb :10
exit 0
Danke für eure Hife
mfg