Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Config
Commits
bf19661f
"git@web.lueluesay.top:root/arm-trusted-firmware.git" did not exist on "c414019bc3d25019bdb50c33adc64cad799629e4"
Commit
bf19661f
authored
Feb 08, 2015
by
Igor Pecovnik
Browse files
Rpi monitor with light and temp sensors
parent
9c6d9daa
Changes
2
Hide whitespace changes
Inline
Side-by-side
functions.sh
View file @
bf19661f
...
@@ -75,6 +75,54 @@ make && make install
...
@@ -75,6 +75,54 @@ make && make install
}
}
install_rpimonitor
(){
#--------------------------------------------------------------------------------------------------------------------------------
# Install rpimonitor with custom config
#--------------------------------------------------------------------------------------------------------------------------------
if
!(
grep
-qs
tvheadend
"/etc/apt/sources.list"
)
;
then
cat
>>
/etc/apt/sources.list
<<
EOF
# RPi-Monitor official repository
deb https://github.com XavierBerger/RPi-Monitor-deb/raw/master/repo/
EOF
fi
apt-key adv
--recv-keys
--keyserver
keyserver.ubuntu.com 2C0D3C0F
debconf-apt-progress
--
apt-get update
debconf-apt-progress
--
apt-get
-y
install
rpimonitor
# add my own configuration which is not default
cd
/etc/rpimonitor
wget https://github.com/igorpecovnik/Debian-micro-home-server/blob/next/src/rpimonitor-myconfig.tgz?raw
=
true
-O
- |
tar
-xz
service rpimonitor restart
}
install_bmc180
(){
#--------------------------------------------------------------------------------------------------------------------------------
# Install temp and pressure sensor read utility
#--------------------------------------------------------------------------------------------------------------------------------
cd
/tmp
git clone https://github.com/maasdoel/bmp180
cd
bmp180
# let's change bus number to suits our need
sed
-i
"s/dev
\/
i2c-1/dev
\/
i2c-2/"
bmp180dev3.c
gcc
-Wall
-o
bmp180 ./bmp180dev3.c
-lm
cp
bmp180 /usr/local/bin
rm
-r
/tmp/bmp180
}
install_tsl2561
(){
#--------------------------------------------------------------------------------------------------------------------------------
# Install light sensor read utility
#--------------------------------------------------------------------------------------------------------------------------------
cd
/tmp
wget https://github.com/igorpecovnik/Debian-micro-home-server/blob/next/src/tsl2561-src.tgz?raw
=
true
-O
- |
tar
-xz
gcc
-Wall
-O2
-o
TSL2561.o
-c
TSL2561.c
gcc
-Wall
-O2
-o
TSL2561_test.o
-c
TSL2561_test.c
gcc
-Wall
-O2
-o
TSL2561_test TSL2561.o TSL2561_test.o
cp
TSL2561_test /usr/local/bin/tsl2561
}
install_tvheadend
(){
install_tvheadend
(){
#--------------------------------------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------------------------------------
# TVheadend
# TVheadend
...
...
install.sh
View file @
bf19661f
...
@@ -52,6 +52,7 @@ whiptail --ok-button "Install" --title "Debian micro home server installation (c
...
@@ -52,6 +52,7 @@ whiptail --ok-button "Install" --title "Debian micro home server installation (c
"CUPS"
"Printing"
off
\
"CUPS"
"Printing"
off
\
"Scanner"
"Control your scanner with buttons, OCR"
off
\
"Scanner"
"Control your scanner with buttons, OCR"
off
\
"Temper"
"USB temperature sensor"
off
\
"Temper"
"USB temperature sensor"
off
\
"Rpi monitor"
"Status page and statistics"
off
\
"Transmission"
"Torrent downloading"
off
\
"Transmission"
"Torrent downloading"
off
\
"ISPConfig"
"WWW, PHP, SQL, SMTP, IMAP, POP3"
off 2>results
"ISPConfig"
"WWW, PHP, SQL, SMTP, IMAP, POP3"
off 2>results
while
read
choice
while
read
choice
...
@@ -64,6 +65,7 @@ do
...
@@ -64,6 +65,7 @@ do
"CUPS"
)
ins_cups
=
"true"
;;
"CUPS"
)
ins_cups
=
"true"
;;
"Scanner"
)
ins_scaner_and_scanbuttons
=
"true"
;;
"Scanner"
)
ins_scaner_and_scanbuttons
=
"true"
;;
"Temper"
)
ins_temper
=
"true"
;;
"Temper"
)
ins_temper
=
"true"
;;
"Rpi monitor"
)
ins_rpimonitor
=
"true"
;;
"Transmission"
)
ins_transmission
=
"true"
;;
"Transmission"
)
ins_transmission
=
"true"
;;
"ISPConfig"
)
ins_ispconfig
=
"true"
;;
"ISPConfig"
)
ins_ispconfig
=
"true"
;;
*
)
*
)
...
@@ -79,6 +81,7 @@ if [[ "$ins_vpn_server" == "true" ]]; then install_vpn_server; fi
...
@@ -79,6 +81,7 @@ if [[ "$ins_vpn_server" == "true" ]]; then install_vpn_server; fi
if
[[
"
$ins_cups
"
==
"true"
]]
;
then
install_cups
;
fi
if
[[
"
$ins_cups
"
==
"true"
]]
;
then
install_cups
;
fi
if
[[
"
$ins_scanner_and_scanbuttons
"
==
"true"
]]
;
then
install_scaner_and_scanbuttons
;
fi
if
[[
"
$ins_scanner_and_scanbuttons
"
==
"true"
]]
;
then
install_scaner_and_scanbuttons
;
fi
if
[[
"
$ins_temper
"
==
"true"
]]
;
then
install_temper
;
fi
if
[[
"
$ins_temper
"
==
"true"
]]
;
then
install_temper
;
fi
if
[[
"
$ins_rpimonitor
"
==
"true"
]]
;
then
install_bmc180
;
install_tsl2561
;
install_rpimonitor
;
fi
if
[[
"
$ins_transmission
"
==
"true"
]]
;
then
install_transmission
;
fi
if
[[
"
$ins_transmission
"
==
"true"
]]
;
then
install_transmission
;
fi
if
[[
"
$ins_ispconfig
"
==
"true"
]]
;
then
if
[[
"
$ins_ispconfig
"
==
"true"
]]
;
then
install_basic
install_basic
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment