[Nextcloud] Change php install

This commit is contained in:
poka 2020-05-19 20:43:35 +02:00
parent 31162f0864
commit 412bad810b
4 changed files with 52 additions and 15 deletions

View File

@ -49,9 +49,11 @@ apt update -y
apt install nginx mariadb-server apt-transport-https curl gnupg2 git lsb-release ssl-cert ca-certificates apt-transport-https tree locate software-properties-common dirmngr screen htop net-tools zip unzip curl ffmpeg ghostscript libfile-fcntllock-perl -y
linux_version=$(cat /etc/os-release | grep VERSION_CODENAME | awk -F '=' '{ print $2}')
apt -y install lsb-release apt-transport-https ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add -
echo "deb https://packages.sury.org/php/ $linux_version main" | tee /etc/apt/sources.list.d/ondrej.list
echo "deb https://packages.sury.org/php/ $OS main" | tee /etc/apt/sources.list.d/ondrej.list
apt update -y
systemctl start nginx || (echo "Erreur quelque part ..." && exit 1)

View File

@ -1,14 +1,30 @@
#!/bin/bash
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1)
ipfsnodeid=$(ipfs id -f='<id>\n')
myProfile="/home/$YOU/.zen/ipfs/.$ipfsnodeid/profile"
astroVars="OS ARM YOU ipfsnodeid ASTROZEN ASTRONODE myProfile"
export YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1)
export ipfsnodeid=$(ipfs id -f='<id>\n')
export ASTROZEN="/home/$YOU/.zen"
export ASTRONODE="$ASTROZEN/ipfs/.$ipfsnodeid"
export myProfile="$ASTRONODE/profile"
[[ ! -d $ASTRONODE ]] && mkdir -p $ASTRONODE
## Check system kind
[[ $(uname -a | grep arm) ]] && ARM=yes || unset ARM
if [[ $(grep -E 'stretch|18.|19.' /etc/os-release) ]]; then OS=stretch;
elif [[ $(grep buster /etc/os-release) ]]; then OS=buster;
[[ $(uname -a | grep arm) ]] && export ARM=yes || unset ARM
if [[ $(grep -E 'stretch|18.|19.' /etc/os-release) ]]; then export OS=stretch;
elif [[ $(grep buster /etc/os-release) ]]; then export OS=buster;
else echo "${c_red}OS not supported$c_"; exit 1; fi
[[ ! grep "OS=" $myProfile ]] && echo "OS=$OS" >> $myProfile
[[ ! grep "ARM=" $myProfile && -n $ARM ]] && echo "ARM=$ARM" >> $myProfile
[[ -e $myProfile ]] && rm $myProfile
touch $myProfile
for i in $astroVars; do
[[ ! $(grep "$i=" $myProfile) && -n ${!i} ]] && echo "export $i=${!i}" >> $myProfile
done
[[ -n $(grep "/.zen/ipfs/" ~/.bashrc) ]] && sed -i -n '/\/.zen\/ipfs/!p' ~/.bashrc
[[ -n $(grep "# ASTROPORT " ~/.bashrc) ]] && sed -i -n '/# ASTROPORT /!p' ~/.bashrc
echo -e "# ASTROPORT ENVIRONMENT VARIABLE\n. /home/$YOU/.zen/ipfs/.$ipfsnodeid/profile" >> ~/.bashrc
[[ $1 != "noexec" ]] && exec bash

View File

@ -1,6 +1,12 @@
#!/bin/bash
shopt -s extglob
cd /home/$YOU/.zen
rm -rf !(astroport)
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1)
sudo systemctl stop ipfs
shopt -s extglob
cd /home/$YOU || exit 1
rm -rf .ipfs/
cd .zen || exit 1
rm -rf !(astroport)

View File

@ -2,18 +2,31 @@
# Check requierments
{
sudo apt update
sudo apt install curl net-tools -y
gitpath="https://git.p2p.legal/axiom-team/astroport/raw/master"
echo "Add colors ..."
curl -s $gitpath/.install/export_colors.sh | bash || exit 1
[[ -n $(grep ".bash_aliases" ~/.bashrc) ]] && echo ". ~/.bash_aliases" ~/.bashrc
echo "${c_green}Astroport installer
###
1. IPFS Swarm Layer$c_"
# Full automatic (you trust this git depot)
curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/.install/ipfs_alone.sh | bash || exit 1
curl -s $gitpath/.install/ipfs_alone.sh | bash || exit 1
# Set environment variables
curl -s $gitpath/.install/sys_checkOS.sh noexec | bash || exit 1
echo "${c_green}2. Ḡ1/ScuttleButt anoptical layer$c_"
# ONCE YOU READ and AGREE. Run TrustFull QUICK Install !!
curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/zen/tools/make_G1SSB_secret.sh | bash || exit 1
curl -s $gitpath/zen/tools/make_G1SSB_secret.sh | bash || exit 1
echo "${c_green}Installation complete$c_"
exec bash
}