diff --git a/.install/nextcloud/install.sh b/.install/nextcloud/install.sh index be8782c..e3c2db3 100755 --- a/.install/nextcloud/install.sh +++ b/.install/nextcloud/install.sh @@ -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 diff --git a/.install/sys_checkOS.sh b/.install/sys_checkOS.sh new file mode 100644 index 0000000..734e406 --- /dev/null +++ b/.install/sys_checkOS.sh @@ -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='\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 diff --git a/debug/reset_ipfs.sh b/debug/reset_ipfs.sh new file mode 100644 index 0000000..e5b6ac1 --- /dev/null +++ b/debug/reset_ipfs.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +shopt -s extglob +cd /home/$YOU/.zen +rm -rf !(astroport) +