Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
agetic
librecast
Commits
1b459bbb
Commit
1b459bbb
authored
Aug 30, 2017
by
Carlos Remuzzi
Browse files
instalando version sin nmcli
parent
b6db3e61
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/install.sh
View file @
1b459bbb
# script basado en https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh
WIFI_INTERFACE
=
$(
cat
/proc/net/wireless | perl
-ne
'/(\w+):/ && print $1'
)
AP_PSK
=
libreCast
USER_NAME
=
$(
whoami
)
configurar_ap
(){
if
nmcli con show
$1
>
/dev/null 2>&1
;
then
echo
"la conexión
$1
está ya instalada"
else
echo
"creando nueva conneccion
$1
"
nmcli con add con-name
$1
ifname
$WIFI_INTERFACE
type
wifi ssid
$1
ip4 192.168.12.2/24 gw4 192.168.12.1
nmcli con modify
$1
ipv4.dns
"192.168.26.20"
nmcli con modify
$1
connection.autoconnect no
nmcli con modify
$1
wifi-sec.key-mgmt wpa-psk wifi-sec.psk
$2
nmcli con modify
$1
wifi-sec.psk libreCast
fi
}
main
()
{
# colores
if
which tput
>
/dev/null 2>&1
;
then
...
...
@@ -41,7 +58,7 @@ main() {
printf
"
${
BLUE
}
Clonando libreCast...
${
NORMAL
}
\n
"
hash
git
>
/dev/null 2>&1
||
{
echo
"Error: git no est
a
instalado"
echo
"Error: git no est
á
instalado"
sudo
apt
install
git
}
...
...
@@ -51,12 +68,12 @@ main() {
}
hash
gst-launch-1.0
>
/dev/null 2>&1
||
{
echo
"Error: gstreamer no est
a
instalado"
echo
"Error: gstreamer no est
á
instalado"
sudo
apt
install
gstreamer1.0-tools
}
hash
pacmd
>
/dev/null 2>&1
||
{
echo
"Error: pulseaudio no est
a
instalado"
echo
"Error: pulseaudio no est
á
instalado"
sudo
apt
install
pulseaudio-utils
}
...
...
@@ -65,35 +82,30 @@ main() {
sudo
apt
install
curl
}
hash
nmcli
>
/dev/null 2>&1
||
{
echo
"Error: nmcli no esta instalado"
exit
1
}
# esto tiene que adaptarse a diferentes distros
WIFI_INTERFACE
=
$(
cat
/proc/net/wireless | perl
-ne
'/(\w+):/ && print $1'
)
AP_NAME
=
libreCast-s1
AP_PSK
=
libreCast
USER_NAME
=
$(
whoami
)
if
[
-d
"
$HOME
/.local/share/applications/"
]
;
then
cp
$HOME
/librecast/libreCast.desktop
$HOME
/.local/share/applications/
sed
-i
-e
"s/USER/
$USER_NAME
/g"
$HOME
/.local/share/applications/libreCast.desktop
fi
if
nmcli con show
$AP_NAME
>
/dev/null 2>&1
;
then
echo
"la conneccion
$AP_NAME
esta ya instalada"
if
which nmcli
>
/dev/null 2>&1
;
then
# esto tiene que cambiar
# y jalar un archivo .yaml
# de configuracion
configurar_ap libreCast-s0
$AP_PSK
configurar_ap libreCast-s1
$AP_PSK
configurar_ap libreCast-s2
$AP_PSK
configurar_ap libreCast-s3
$AP_PSK
else
echo
"creando nueva conneccion
$AP_NAME
"
nmcli con add con-name
$AP_NAME
ifname
$WIFI_INTERFACE
type
wifi ssid
$AP_NAME
ip4 192.168.12.2/24 gw4 192.168.12.1
nmcli con modify
$AP_NAME
ipv4.dns
"192.168.26.20"
nmcli con modify
$AP_NAME
connection.autoconnect no
nmcli con modify
$AP_NAME
wifi-sec.key-mgmt wpa-psk wifi-sec.psk
$AP_PSK
nmcli con modify
$AP_NAME
wifi-sec.psk libreCast
echo
"Advertencia: nmcli no está instalado"
echo
"Será necesario configurar la conexión wifi manualmente"
echo
"Consultar la guía de instalación para mayores info"
echo
"https://gitlab.geo.gob.bo/agetic/librecast/blob/master/INSTALL.md"
fi
# configuraci
o
n de la resolucion de pantalla
# configuraci
ó
n de la resolucion de pantalla
# xdpyinfo | awk '/dimensions/{print $2}'
printf
"
${
GREEN
}
"
...
...
Write
Preview
Supports
Markdown
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