From 4abc7ddd6932e9d3479baf9583718f835e043f19 Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 11 Aug 2021 23:09:30 +0200 Subject: [PATCH] YOU can be used after ISOConfig has run --- install.sh | 17 +++++++++++++++-- www/boris/ajax.php | 11 +++++++++++ www/boris/film.php | 1 + zen/ipns_TAG_refresh.sh | 2 +- 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 5d08ecf..e8641a6 100755 --- a/install.sh +++ b/install.sh @@ -16,8 +16,21 @@ sudo apt-get update sudo apt-get install git fail2ban inotify-tools curl net-tools libsodium* python3-dev python3-pip python3-setuptools python3-wheel python3-dotenv mpack libssl-dev libffi-dev -y sudo apt-get install build-essential qrencode jq bc gawk ffmpeg sqlite dnsutils v4l-utils vlc mp3info musl-dev openssl* cargo detox httrack html2text ssmtp sudo -y [[ ! $(which kodi) && "$USER" != "xbian" ]] && sudo apt-get install kodi -y -sudo apt-get install python3-opencv -y +sudo apt-get install python3-opencv -y ## INSTALLATION IA par reconnaissance d'images [[ "$USER" != "xbian" ]] && sudo apt-get install x11-utils xclip zenity handbrake* -y +if [[ ! $(which apache2) ]]; then + ######################################################################## + ## INSTALL nginx + php + mariadb + ... + sudo apt-get install mariadb-server nginx python3-certbot-nginx certbot ssl-cert php-imap php-cli php-curl php-sqlite3 php-gd php-json php-xml php-mbstring php-gettext php-mysql php-fpm -y + ####################################################################### + ## CREATE symlinks for ~/.zen/www/swarm & me + mkdir -p ~/.zen/astrXbian/www/boris + sudo chown -R $USER:www-data /.zen/astrXbian/www/boris + sudo chmod -R g+rw /.zen/astrXbian/www/boris + ln -s /home/$USER/.zen/ipfs_swarm ~/.zen/astrXbian/www/boris/swarm + ln -s /home/$USER/.zen/ipfs ~/.zen/astrXbian/www/boris/me +fi + ## INSTALL PYTHON CRYPTO LAYER echo 'export PATH=$PATH:$HOME/.local/bin' >> ~/.bashrc && source ~/.bashrc python3 -m pip install -U pip @@ -97,7 +110,7 @@ mkdir -p ~/astroport/anime ## PREPARE www EXCHANGE ZONE ~/astroport/www wwwuser=$(ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1) || wwuser="www-data" mkdir -p ~/astroport/www -sudo chown -R $YOU:$wwwuser ~/astroport/www +sudo chown -R $USER:$wwwuser ~/astroport/www sudo chmod -R g+rw ~/astroport/www if [[ "$USER" != "xbian" ]] diff --git a/www/boris/ajax.php b/www/boris/ajax.php index a8c8fbe..5671ee6 100644 --- a/www/boris/ajax.php +++ b/www/boris/ajax.php @@ -9,6 +9,17 @@ if (isset($_REQUEST['phone'])) $phone = $_REQUEST['phone']; else $phone = urldec $message = "Proposition de ". $phone ." message : ".$link; +//YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d ' ' -f 1); +exec("ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d ' ' -f 1'", $YOU); +print_r($YOU); + +$myfile = fopen("/home/fred/astroport/www/newfile.txt", "w") or die("Unable to open file!"); +$txt = "John Doe\n"; +fwrite($myfile, $txt); +$txt = "Jane Doe\n"; +fwrite($myfile, $txt); +fclose($myfile); + error_log("SEND ". $phone ." message : ".$link ); mail($to, $subject, $message, $headers); echo "OK"; diff --git a/www/boris/film.php b/www/boris/film.php index b499845..c58e3ae 100644 --- a/www/boris/film.php +++ b/www/boris/film.php @@ -7,6 +7,7 @@ $videosList = array(); exec("/bin/bash -c './get_astrxbian_index.sh F'", $videos); exec("/bin/bash -c '/home/fred/.zen/astrXbian/actions/check_my_wallet.sh'", $gg1); + $videos = array_reverse($videos); // ## film;MDan5TDuT-0;;Le Manuel de Survie en Dictature v1.1 au format papier;;["onelove"];k51qzi5uqu5dl0hnglpzumjezep2avacrtbx7i15v91elcxac4cpd8290kl1hq;720p;/ipfs/QmZp63RXhLm6QASmw1t2R8fu5waSJFmyW7cmdVNxyuJXzg/MDan5TDuT-0_Le%20Manuel%20de%20Survie%20en%20Dictature%20v1.1%20au%20format%20papier.mp4 diff --git a/zen/ipns_TAG_refresh.sh b/zen/ipns_TAG_refresh.sh index eb9dec8..5dab3f9 100755 --- a/zen/ipns_TAG_refresh.sh +++ b/zen/ipns_TAG_refresh.sh @@ -181,7 +181,7 @@ do

Ce media possède un G1 portefeuille avec lequel il paye son hébergement. -
Voici les dons reçus par le Media (${mediakey}). Ce média vous plait? Ajoutez le votre...
+
Voici les dons reçus par (${mediakey}). Ce média vous plait? Flashez ce QRCode.




${MEDIAPUBKEY} = ${ZENBALANCE} ZEN