-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrc.local
executable file
·40 lines (34 loc) · 1009 Bytes
/
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
35
36
37
38
39
40
#!/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
#########################################################
# Setup Environment and Start Patiobar / pianobar
export FIRSTBOOT=1
export SCRIPTSBASEDIR="/home/vloschiavo/src/vloradio"
. ${SCRIPTSBASEDIR}/config.sh
if [ ! -f ${EPHEMERAL}/menuctl ]
sudo -iu \#1000 touch ${EPHEMERAL}/menuctl
sudo -iu \#1000 cat > ${EPHEMERAL}/menuctl <<EOL
selectedMenu=0
selectedItem=0
EOL
fi
# Start up message
sudo -iu \#1000 ${SCRIPTSBASEDIR}/startupdisplay.sh &
sudo -iu \#1000 /usr/local/bin/pbstart &
#########################################################
exit 0