Max2Play Home › Forums › Max2Play on Raspberry PI › [FAIL] startpar: service(s) returned failure: rc.local… failed! › Reply To: [FAIL] startpar: service(s) returned failure: rc.local… failed!
something seems to have gone wrong while installing / deinstalling some services. Please use the following code for your 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 #Max2Play sudo -u pi -H -s /opt/max2play/autostart_xbmc.sh > /dev/null 2>&1 & #Network Check for Mountpoints COUNTER=0;while [ -z "$(/sbin/ifconfig eth0 | grep -i 'inet ad')" -a -z "$(/sbin/ifconfig wlan0 | grep -i 'inet ad')" -a "$COUNTER" -lt "5" ]; do echo "Waiting for network";COUNTER=$((COUNTER+1));sleep 3;done;set +e;/bin/mount -a;set -e; #Max2Play Start Audioplayer sudo -u pi -H -s /opt/max2play/start_audioplayer.sh > /dev/null 2>&1 & if [ "$(LANG=C && /sbin/ifconfig eth0 | grep 'inet addr:' | wc -l)" -lt "1" ]; then sudo /opt/max2play/wps_config.sh; fi exit 0
If you remember what you did before this happened, please tell us and we will fix the bug.