Kaynağa Gözat

simplification

Gamaliel Espinoza 7 yıl önce
ebeveyn
işleme
e9160f220d
1 değiştirilmiş dosya ile 13 ekleme ve 22 silme
  1. 13 22
      fourier_install.sh

+ 13 - 22
fourier_install.sh

@@ -14,11 +14,12 @@ tunnelfile="$programspath/ssh-tunnel.sh"
 mysql_user=fourier
 mysql_passwd='Sup3rDuper!'
 mysql_db=fourier
+mount_point=/media/datadrive
 
 echo "Fourier installer $installer_version"
 echo "------------------------------------"
 
-sudo apt-get install python pip
+sudo apt-get install python python-pip
 
 if [[ "$OSTYPE" == darwin* ]]; then
 	programspath=~/fourier
@@ -36,11 +37,6 @@ read -p "How many receivers has this box? " RECEIVERS_COUNT
 read -p "Box ID (from API): " BOX_ID
 read -p "API secret: " API_SECRET
 
-findmnt /media/datadrive
-if [ "$?" -neq 0 ]; then
-	echo -e '\e[34mData drive is not mounted\e[0m'
-fi
-
 if [[ "$OSTYPE" == darwin* ]]; then
 	keyfile="$programspath/fourier.key"
 	[ ! -f "$keyfile" ] && ssh-keygen -t rsa -b 2048 -f $keyfile
@@ -66,7 +62,7 @@ fi
 
 if [[ "$OSTYPE" == darwin* ]]; then
 	depend=( python gcc vim tmux autossh lame nodejs \
-			 ezstream libusb rtl-sdr nim portaudio )
+			 ezstream libusb rtl-sdr portaudio )
 	for dep in "${depend[@]}"
 	do
 		brew list $dep > /dev/null
@@ -78,7 +74,7 @@ if [[ "$OSTYPE" == darwin* ]]; then
 	pip install -r $installerpath/requirements.txt
 else
 	curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
-	sudo apt-get install -y alsa-utils
+	sudo apt-get install -y alsa-utils alsa-tools
 	sudo apt-get install -y libudev-dev
 	sudo apt-get install -y tmux
 	sudo apt-get install -y vim
@@ -91,7 +87,7 @@ else
 	sudo apt-get install -y ezstream
 	sudo apt-get install -y cmake
 	sudo apt-get install -y rtl-sdr
-	sudo apt-get install sqlite3
+	sudo apt-get install -y sqlite3
 	sudo apt-get install -y portaudio19-dev
 	sudo pip install pyaudio
 	sudo apt-get install -y ffmpeg
@@ -146,21 +142,8 @@ if [[ "$OSTYPE" != darwin* ]]; then
 	make
 	sudo cp ./src/rtl_fm /usr/bin/rtl_fm
 	echo "SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", MODE:="0666"" | sudo tee -a /etc/udev/rules.d/rtl-sdr.rules
-
-	#build and install nim
-	cd $programspath
-	curl -L https://nim-lang.org/download/nim-0.17.0.tar.xz -o nim-0.17.0.tar.xz
-	tar xvf nim-0.17.0.tar.xz
-	cd nim-0.17.0
-	sh build.sh
-	bin/nim c koch
-	./koch tools
-	echo "export PATH=$programspath/nim-0.17.0/bin:$PATH" >> ~/.bashrc
 fi
 
-cd $programspath/fourier-alt
-nimble build
-
 # --------------------------------- #
 # Generación de los scripts con pm2 #
 # --------------------------------- #
@@ -188,6 +171,14 @@ if [[ "$OSTYPE" != darwin* ]]; then
 	sudo cp $installerpath/fourier-key.json /etc/Fourier-key.json
 fi
 
+
+findmnt $mount_point
+if [ "$?" -neq 0 ]; then
+	echo -e '\e[34mData drive is not mounted\e[0m'
+
+fi
+
+
 echo "****************************************************************************"
 echo "REMEMBER: Initialize attached storage and create a symlink named $datapath pointing to the storage volume"
 echo "****************************************************************************"