From 32c7b111f318aa1b58cd69e519ae6990d61309f8 Mon Sep 17 00:00:00 2001 From: qo-op Date: Tue, 12 May 2020 00:19:21 +0200 Subject: [PATCH] TEST --- .install/loveland.sh | 5 +++ .install/templates/copylaradio/mpd.conf | 13 +++++-- g1sms/test.sh | 63 ++------------------------------- www/loveland.conf | 12 ++----- 4 files changed, 21 insertions(+), 72 deletions(-) diff --git a/.install/loveland.sh b/.install/loveland.sh index 5a621e1..4af5756 100755 --- a/.install/loveland.sh +++ b/.install/loveland.sh @@ -24,6 +24,11 @@ sudo apt-get install ca-certificates git-core binutils rsync alsa-utils bc espea ## CONFIG MPD sudo cp -f $MY_PATH/templates/copylaradio/mpd.conf /etc/mpd.conf sudo sed -i "s/_USER_/$USER/g" /etc/mpd.conf || err=1 + +mkdir ~/.config/mpd +sudo cp -f /etc/mpd.conf ~/.config/mpd/mpd.conf +chown $USER ~/.config/mpd/mpd.conf + mkdir -p ~/.zen/music mkdir -p ~/.zen/playlists diff --git a/.install/templates/copylaradio/mpd.conf b/.install/templates/copylaradio/mpd.conf index 3b518f6..4d66d29 100644 --- a/.install/templates/copylaradio/mpd.conf +++ b/.install/templates/copylaradio/mpd.conf @@ -1,13 +1,14 @@ music_directory "/home/_USER_/.zen/music" playlist_directory "/home/_USER_/.zen/playlists" user "_USER_" -bind_to_address "any" +bind_to_address "localhost" auto_update "yes" zeroconf_enabled "yes" -zeroconf_name "CopyLaRadio Music Recorder" +zeroconf_name "Astroport CopyLaRadio Jukebox" connection_timeout "120" filesystem_charset "UTF-8" id3v1_encoding "UTF-8" +log_file "syslog" ############################### audio_output { @@ -25,3 +26,11 @@ id3v1_encoding "UTF-8" # bitrate "128" format "44100:16:1" } + + audio_output { + type "fifo" + name "my pipe" + path "/tmp/snapfifo" + format "48000:16:2" + mixer_type "software" + } diff --git a/g1sms/test.sh b/g1sms/test.sh index b51d4ec..8ff0a28 100755 --- a/g1sms/test.sh +++ b/g1sms/test.sh @@ -11,9 +11,6 @@ ME="${0##*/}" source $MY_PATH/init.sh source $MY_PATH/functions.sh -STOP="RUN" - -$MY_PATH/search TODO echo "Lancez dans une console tail -f /tmp/g1sms.log pour suivre le déroulement (log)" echo @@ -22,73 +19,17 @@ echo "Quel est le numéro de téléphone émetteur? " read SMS_1_NUMBER if [[ "$SMS_1_NUMBER" == "" ]]; then SMS_1_NUMBER=$ADMINPHONE; fi -if [[ $STOP == "RUN" ]]; then - cat $MY_PATH/sms_received.sh -fi -echo "Lisez le code et saisissez votre commande?" +echo "Saisissez votre commande?" read SMS_1_TEXT CMD=$(echo "$SMS_1_TEXT" | awk '{print toupper($1)}') -if [[ $STOP == "RUN" ]]; then -case "$CMD" in - DESTROY|DON) - cat $MY_PATH/sms_DESTROY.sh - ;; - A|AIDE) - cat $MY_PATH/sms_AIDE.sh - ;; - N|D|NOUV) - cat $MY_PATH/sms_NEW.sh - ;; - P|PAY) - cat $MY_PATH/sms_PAY.sh - ;; - VIR) - cat $MY_PATH/sms_VIR.sh - ;; - C|S|SOLDE) - cat $MY_PATH/sms_COUNT.sh - ;; - EMAIL) - cat $MY_PATH/sms_EMAIL.sh - ;; - BILL) - cat $MY_PATH/sms_BILLET.sh - ;; - CHK) - cat $MY_PATH/sms_BILLETCHK.sh - ;; - TAG) - cat $MY_PATH/sms_TAG.sh - ;; - REC) - cat $MY_PATH/sms_REC.sh - ;; - U|UNIT) - cat $MY_PATH/sms_SETUNIT.sh - ;; - NAME|NOM) - cat $MY_PATH/sms_SETUIDNA.sh - ;; - ADMIN) - cat $MY_PATH/sms_ADMIN.sh - ;; - *) - echo "Moi pas connaitre..." - ;; -esac - echo "OK. ON LANCE CE CODE??? Ctrl+C pour stopper" read QUOI SMS_1_TEXT=$SMS_1_TEXT $QUOI -fi export SMS_1_NUMBER export SMS_1_TEXT + $MY_PATH/sms_received.sh - -echo "ECRIVEZ STOP=\"STOP\" POUR NE PLUS LIRE LE CODE ET LANCER LA SIMULATION DIRECTEMENT" -read STOP - diff --git a/www/loveland.conf b/www/loveland.conf index f454f41..7676d3f 100644 --- a/www/loveland.conf +++ b/www/loveland.conf @@ -7,14 +7,8 @@ server { server_name _SERVERNAME_; - location / { - allow all; - index index.php index.html index.htm; - error_page 404 = /error/404.html; - } - # This section can be copied into an existing default setup - location /jukebox { + location / { allow all; index index.php index.html index.htm; location ~ \.php { @@ -25,14 +19,14 @@ server { include /etc/nginx/fastcgi_params; fastcgi_read_timeout 1800; } - error_page 404 = /error/404.php; + error_page 404 = /error/404.html; try_files $uri $uri/ =404; location ~ /albumart/* { expires -1s; } } -# OASIS SSB +# OASIS SSB TODO: NOT WORKING (cor problem) location /oasis { proxy_pass http://127.0.0.1:3000; proxy_set_header Host $host;