/home/$YOU/astroport/www

This commit is contained in:
fred 2021-08-11 20:30:53 +02:00
parent 4bfccb9ae6
commit 472b4eee90
2 changed files with 22 additions and 17 deletions

View File

@ -24,15 +24,15 @@ python3 -m pip install -U pip
python3 -m pip install -U setuptools wheel
python3 -m pip install -U cryptography Ed25519 base58 google protobuf duniterpy
if [[ "$USER" == "pi" ]]; then ## PROPOSE QR_CODE PRINTER
echo "INSTALLER ACCES SMS ET IMPRIMANTE A QR CODE? saisissez OUI, sinon tapez sur ENTREE"
read saisie
if [[ $saisie != "" ]]; then
sudo apt install printer-driver-all cups -y
sudo pip3 install brother_ql
sudo cupsctl --remote-admin
sudo usermod -aG lpadmin pi
echo "INSTALLER ACCES SMS ET IMPRIMANTE A QR CODE? saisissez OUI, sinon tapez sur ENTREE"
read saisie
if [[ $saisie != "" ]]; then
sudo apt install printer-driver-all cups -y
sudo pip3 install brother_ql
sudo cupsctl --remote-admin
sudo usermod -aG lpadmin pi
sudo usermod -a -G gammu pi
fi
fi
fi
# python3 -m pip install -U silkaj
## python -> python3 link
@ -61,7 +61,7 @@ cd ~/.zen/astrXbian/zen/jaklis
########################################################################
echo "Sécurisation DEFCON SUDOERS FAIL2BAN"
## XBIAN fail2ban ERROR correction ##
## XBIAN fail2ban ERROR correction ##
#[....] Starting authentication failure monitor: fail2ban No file(s) found for glob /var/log/auth.log
[[ "$USER" == "xbian" ]] && sudo sed -i "s/auth.log/faillog/g" /etc/fail2ban/paths-common.conf
# NODE activates fail2ban IN zen/ipfs_SWARM_refresh.sh
@ -83,7 +83,7 @@ then
cd /etc/rc0.d && sudo ln -s ../init.d/ipfs K01ipfs
cd /etc/rc1.d && sudo ln -s ../init.d/ipfs K01ipfs
cd /etc/rc6.d && sudo ln -s ../init.d/ipfs K01ipfs
# Disable xbian-config auto launch
echo 0 > ~/.xbian-config-start
@ -94,17 +94,22 @@ fi
mkdir -p ~/astroport/film
mkdir -p ~/astroport/serie
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 chmod -R g+rw ~/astroport/www
if [[ "$USER" != "xbian" ]]
then
## Desktop install
echo "INITIALISATIOn Astroport/KODI"
echo "Appuyez sur la touche ENTREE pour créer une nouvelle identité"
echo "sinon interrompez ici l'installation pour copier la restauration d'une sauvegarde"
echo "sinon interrompez ici l'installation pour copier la restauration d'une sauvegarde (~/.zen & ~/.ipfs)"
read
~/.zen/astrXbian/ISOconfig.sh
else
## Rpi Xbian install.
## Rpi Xbian install.
cat /etc/rc.local | grep -Ev "exit 0" > /tmp/new.rc.local ## REMOVE "exit 0"
# PREPARE NEXT BOOT - Network config - NEXTBOOT - ISOConfig - NEXTBOOT - OK
echo "su - xbian -c '~/.zen/astrXbian/FirstBOOT.sh'" >> /tmp/new.rc.local
@ -123,7 +128,7 @@ echo "Installation déjà faite !!
========================
Astroport/KODI (Gchange)
========================
Connectez-vous sur https://gchange.fr avec vos identifiants
Connectez-vous sur https://gchange.fr avec vos identifiants
$(cat ~/.zen/secret.june)

View File

@ -124,11 +124,11 @@ sed -i "s/_G1PUB_/$G1PUB/g" $wiki
# https:\/\/www.gchange.fr\/#\/app\/records\/wallet?q=$G1PUB
########################################################################
## PREPARE www EXCHANGE ZONE .$IPFSNODEID/astroport/www
if [[ ! -d /home/$YOU/.zen/ipfs/.$IPFSNODEID/astroport/www ]]; then
if [[ ! -d /home/$YOU/astroport/www ]]; then
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 /home/$YOU/.zen/ipfs/.$IPFSNODEID/astroport/www
chown -R $YOU:$wwwuser /home/$YOU/.zen/ipfs/.$IPFSNODEID/astroport/www
chmod -R g+rw /home/$YOU/.zen/ipfs/.$IPFSNODEID/astroport/www
mkdir -p /home/$YOU/astroport/www
sudo chown -R $YOU:$wwwuser /home/$YOU/astroport/www
sudo chmod -R g+rw /home/$YOU/astroport/www
fi
########################################################################
###