|
|
@@ -57,9 +57,9 @@ curl -X POST -F "key=$keycontent" \
|
|
|
-H "Authorization: $BOX_ID $API_SECRET" \
|
|
|
https://api.audiovalid.com/public-key
|
|
|
|
|
|
-echo -e "\e[33mPlease add the following public key to server's authorized keys:\e[0m"
|
|
|
-cat $keyfile.pub
|
|
|
-read -p "Press enter to continue"
|
|
|
+# echo -e "\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
|
|
|
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
|
|
|
@@ -152,15 +152,6 @@ if [[ "$OSTYPE" != darwin* ]]; then
|
|
|
echo "SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", MODE:="0666"" | sudo tee -a /etc/udev/rules.d/rtl-sdr.rules
|
|
|
fi
|
|
|
|
|
|
-# --------------------------------- #
|
|
|
-# Generación de los scripts con pm2 #
|
|
|
-# --------------------------------- #
|
|
|
-# cd $programspath
|
|
|
-# pm2 start fourier-ondemand --interpreter python --name ondemand
|
|
|
-# pm2 start server
|
|
|
-# pm2 start monitor
|
|
|
-# pm2 start uploader
|
|
|
-
|
|
|
[ ! -f "$configfile" ] && \
|
|
|
sudo python $installerpath/configure.py \
|
|
|
$installerpath/fourier-config.json \
|
|
|
@@ -169,6 +160,18 @@ fi
|
|
|
-receivers $RECEIVERS_COUNT \
|
|
|
-api-secret $API_SECRET \
|
|
|
-box-id "$BOX_ID"
|
|
|
+ if [ "$?" -eq 0 ]; then
|
|
|
+ cd "$programspath"
|
|
|
+ pm2 start server
|
|
|
+ pm2 start monitor
|
|
|
+ pm2 start uploader
|
|
|
+ pm2 start ondemand/ondemand/service.py \
|
|
|
+ --interpreter=python \
|
|
|
+ --name=ondemand
|
|
|
+ pm2 start http-server
|
|
|
+ pm2 save
|
|
|
+ pm2 startup
|
|
|
+ fi
|
|
|
|
|
|
if [[ "$OSTYPE" != darwin* ]]; then
|
|
|
sudo mysql -u root -e "create database $mysql_db;"
|