-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathetc_rc.local
executable file
·34 lines (29 loc) · 987 Bytes
/
etc_rc.local
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/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
/sbin/swapoff -a
set clobber
/bin/mkdir -p /boot/network_files
/usr/bin/touch /boot/network_files/networks_list.txt
/usr/bin/python /home/pi/Documents/workspace/ohgee/generate_wpa_conf.py /boot/network_files/networks_list.txt /etc/wpa_supplicant/wpa_supplicant.conf
/usr/bin/touch /var/log/ohgee.out
/bin/mv /var/log/ohgee.out /boot/network_files/last-ohgee.out
/usr/bin/touch /var/log/ohgee.out
/bin/chmod 777 /var/log/ohgee.out
# Startup has been moved to LXDE-pi/autostart
# su - pi -c "cd Documents/workspace/ohgee;pwd;./autorun.sh" > /var/log/ohgee.out 2>&1
exit 0