|
@@ -1,3 +1,4 @@
|
|
|
|
|
+# version 1.0.1
|
|
|
#install essential software
|
|
#install essential software
|
|
|
#sudo apt-get update
|
|
#sudo apt-get update
|
|
|
|
|
|
|
@@ -5,6 +6,9 @@ programspath=~/programs
|
|
|
installerpath=$(pwd)
|
|
installerpath=$(pwd)
|
|
|
configfile='/etc/fourier-config.json'
|
|
configfile='/etc/fourier-config.json'
|
|
|
gitbase="https://git.miralo.xyz/AudioValid"
|
|
gitbase="https://git.miralo.xyz/AudioValid"
|
|
|
|
|
+tunnel_user=rtunnel
|
|
|
|
|
+datapath='/var/fourier'
|
|
|
|
|
+serverhost='audiovalid.com'
|
|
|
|
|
|
|
|
if [[ "$OSTYPE" == darwin* ]]; then
|
|
if [[ "$OSTYPE" == darwin* ]]; then
|
|
|
programspath=~/fourier
|
|
programspath=~/fourier
|
|
@@ -15,7 +19,6 @@ fi
|
|
|
read -p "Whats this box port (last 3 numbers with zero for padding)?" PORT
|
|
read -p "Whats this box port (last 3 numbers with zero for padding)?" PORT
|
|
|
read -p "How many receivers has this box? " RECEIVERS_COUNT
|
|
read -p "How many receivers has this box? " RECEIVERS_COUNT
|
|
|
|
|
|
|
|
-
|
|
|
|
|
if [[ "$OSTYPE" == darwin* ]]; then
|
|
if [[ "$OSTYPE" == darwin* ]]; then
|
|
|
keyfile="$programspath/fourier.key"
|
|
keyfile="$programspath/fourier.key"
|
|
|
[ ! -f "$keyfile" ] && ssh-keygen -t rsa -b 2048 -f $keyfile
|
|
[ ! -f "$keyfile" ] && ssh-keygen -t rsa -b 2048 -f $keyfile
|
|
@@ -33,7 +36,8 @@ cat $keyfile.pub
|
|
|
read -p "Press enter to continue"
|
|
read -p "Press enter to continue"
|
|
|
|
|
|
|
|
if [[ "$OSTYPE" != darwin* ]]; then
|
|
if [[ "$OSTYPE" != darwin* ]]; then
|
|
|
- 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 rtunnel@server.fourier.audio -p 22" > ssh-tunnel.sh
|
|
|
|
|
|
|
+ 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/
|
|
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 ssh-tunnel.service /etc/systemd/system/ssh-tunnel.service
|
|
|
|
|
|
|
@@ -170,5 +174,5 @@ if [[ "$OSTYPE" != darwin* ]]; then
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
echo "****************************************************************************"
|
|
echo "****************************************************************************"
|
|
|
-echo "REMEMBER: Initialize attached storage and create a symlink named /var/fourier pointing to the storage volume"
|
|
|
|
|
|
|
+echo "REMEMBER: Initialize attached storage and create a symlink named $datapath pointing to the storage volume"
|
|
|
echo "****************************************************************************"
|
|
echo "****************************************************************************"
|