|
|
@@ -1,14 +1,19 @@
|
|
|
-# version 1.0.1
|
|
|
-#install essential software
|
|
|
-#sudo apt-get update
|
|
|
+# version 1.0.2
|
|
|
+# install essential software
|
|
|
+# sudo apt-get update
|
|
|
|
|
|
+installer_version=1.0.2
|
|
|
programspath=~/programs
|
|
|
installerpath=$(pwd)
|
|
|
configfile='/etc/fourier-config.json'
|
|
|
gitbase="https://git.miralo.xyz/AudioValid"
|
|
|
tunnel_user=rtunnel
|
|
|
datapath='/var/fourier'
|
|
|
-serverhost='audiovalid.com'
|
|
|
+serverhost='monitor.audiovalid.com'
|
|
|
+tunnelfile="$programspath/ssh-tunnel.sh"
|
|
|
+
|
|
|
+echo "Fourier installer $installer_version"
|
|
|
+echo "------------------------------------"
|
|
|
|
|
|
if [[ "$OSTYPE" == darwin* ]]; then
|
|
|
programspath=~/fourier
|
|
|
@@ -24,22 +29,18 @@ if [[ "$OSTYPE" == darwin* ]]; then
|
|
|
[ ! -f "$keyfile" ] && ssh-keygen -t rsa -b 2048 -f $keyfile
|
|
|
else
|
|
|
keyspath=~/.ssh
|
|
|
- keyfile="$keyspath/.ssh"
|
|
|
+ keyfile="$keyspath/id_rsa"
|
|
|
[ ! -d "$keyspath" ] && mkdir $keyspath
|
|
|
ssh-keygen -t rsa -b 2048 -C "$HOSTNAME" -f $keyfile
|
|
|
fi
|
|
|
|
|
|
-echo "Please add the following public key to server's authorized keys:"
|
|
|
-
|
|
|
+echo "\e[33mPlease add the following public key to server's authorized keys:\e[0m"
|
|
|
cat $keyfile.pub
|
|
|
-
|
|
|
read -p "Press enter to continue"
|
|
|
|
|
|
if [[ "$OSTYPE" != darwin* ]]; then
|
|
|
- tunnelfile="$programspath/ssh-tunnel.sh"
|
|
|
echo "/usr/bin/autossh -N -f -M 7$PORT -oPubkeyAuthentication=yes -oPasswordAuthentication=no -oLogLevel=error -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no -i $keyfile -R 6$PORT:localhost:22 $tunnel_user@$serverhost -p 22" > $tunnelfile
|
|
|
- curl -L -o ssh-tunnel.service https://gist.githubusercontent.com/niofis/bc24f1b33414fd77d77f/raw/
|
|
|
- sudo mv ssh-tunnel.service /etc/systemd/system/ssh-tunnel.service
|
|
|
+ sudo mv $installerpath/ssh-tunnel.service /etc/systemd/system/ssh-tunnel.service
|
|
|
|
|
|
sudo systemctl enable ssh-tunnel
|
|
|
sudo systemctl start ssh-tunnel
|
|
|
@@ -71,6 +72,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
|
|
|
wget https://bootstrap.pypa.io/get-pip.py
|
|
|
sudo python get-pip.py
|
|
|
sudo apt-get install -y portaudio19-dev
|
|
|
@@ -81,10 +83,12 @@ else
|
|
|
sudo apt-get install -y gfortran libopenblas-dev liblapack-dev
|
|
|
sudo pip install scipy
|
|
|
sudo apt-get install -y python-matplotlib
|
|
|
- #sudo apt-get install -y python-mysqldb
|
|
|
sudo apt-get install -y curl
|
|
|
- #sudo pip install mysql-connector==2.1.4
|
|
|
sudo pip install requests
|
|
|
+ sudo pip install python-firebase
|
|
|
+ cd tools
|
|
|
+ sudo python ./setup.py install
|
|
|
+ cd ..
|
|
|
fi
|
|
|
|
|
|
cd $programspath
|
|
|
@@ -137,22 +141,9 @@ if [[ "$OSTYPE" != darwin* ]]; then
|
|
|
echo "export PATH=$programspath/nim-0.17.0/bin:$PATH" >> ~/.bashrc
|
|
|
fi
|
|
|
|
|
|
-#build fourier-alt
|
|
|
cd $programspath/fourier-alt
|
|
|
nimble build
|
|
|
|
|
|
-#configure ramdisk
|
|
|
-#sudo mkdir -p /mnt/ramdisk
|
|
|
-#echo "ramfs /mnt/ramdisk ramfs nodev,nosuid,noexec,nodiratime,umask=000,noatime,size=256m 0 0" | sudo tee -a /etc/fstab
|
|
|
-#sudo chgrp plugdev /mnt/ramdisk
|
|
|
-#sudo chmod g+w /mnt/ramdisk
|
|
|
-#sudo chmod +t /mnt/ramdisk
|
|
|
-#cd ~
|
|
|
-
|
|
|
-#curl -L -o fourier.service https://gist.githubusercontent.com/niofis/86e6e3fbe72a01263fbd388bde7953ea/raw/
|
|
|
-#sudo mv fourier.service /etc/systemd/system/fourier.service
|
|
|
-#sudo systemctl enable fourier
|
|
|
-
|
|
|
[ ! -f "$configfile" ] && \
|
|
|
python $installerpath/configure.py \
|
|
|
$installerpath/fourier-config.json \
|