Change environnement variables session

This commit is contained in:
poka 2020-05-19 18:40:50 +02:00
parent 1db58a0160
commit 6979edc247
3 changed files with 22 additions and 2 deletions

View File

@ -27,6 +27,7 @@ if [ "$EUID" -ne 0 ]
fi
## Atroport config
echo "Getting local hostname..."
nc_domain=$(/home/$YOU/.zen/astroport/zen/tools/nodename)
templates="/home/$YOU/.zen/astroport/.install/nextcloud/templates"
@ -43,9 +44,8 @@ else
cd $templates
fi
## Set apt key and upgrade system
## Update system packages
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

14
.install/sys_checkOS.sh Normal file
View File

@ -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

6
debug/reset_ipfs.sh Normal file
View File

@ -0,0 +1,6 @@
#!/bin/bash
shopt -s extglob
cd /home/$YOU/.zen
rm -rf !(astroport)