Change environnement variables session
This commit is contained in:
parent
1db58a0160
commit
6979edc247
|
@ -27,6 +27,7 @@ if [ "$EUID" -ne 0 ]
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Atroport config
|
## Atroport config
|
||||||
|
echo "Getting local hostname..."
|
||||||
nc_domain=$(/home/$YOU/.zen/astroport/zen/tools/nodename)
|
nc_domain=$(/home/$YOU/.zen/astroport/zen/tools/nodename)
|
||||||
templates="/home/$YOU/.zen/astroport/.install/nextcloud/templates"
|
templates="/home/$YOU/.zen/astroport/.install/nextcloud/templates"
|
||||||
|
|
||||||
|
@ -43,9 +44,8 @@ else
|
||||||
cd $templates
|
cd $templates
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Set apt key and upgrade system
|
## Update system packages
|
||||||
apt update -y
|
apt update -y
|
||||||
apt upgrade -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
|
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
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/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"
|
||||||
|
|
||||||
|
## 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;
|
||||||
|
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
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
shopt -s extglob
|
||||||
|
cd /home/$YOU/.zen
|
||||||
|
rm -rf !(astroport)
|
||||||
|
|
Loading…
Reference in New Issue