#!/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