diff --git a/.install/sys_checkOS.sh b/.install/sys_checkOS.sh index 77bd0c7..6fc483b 100644 --- a/.install/sys_checkOS.sh +++ b/.install/sys_checkOS.sh @@ -23,8 +23,14 @@ for i in $astroVars; do [[ ! $(grep "$i=" $myProfile) && -n ${!i} ]] && echo "export $i=${!i}" >> $myProfile done +# Export for user [[ -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 +# Export for root +[[ -n $(sudo grep "/.zen/ipfs/" /root/.bashrc) ]] && sudo sed -i -n '/\/.zen\/ipfs/!p' /root/.bashrc +[[ -n $(sudo grep "# ASTROPORT " /root/.bashrc) ]] && sudo sed -i -n '/# ASTROPORT /!p' /root/.bashrc +echo -e "# ASTROPORT ENVIRONMENT VARIABLE\n. /home/$YOU/.zen/ipfs/.$ipfsnodeid/profile" | sudo tee -a /root/.bashrc + [[ $1 != "noexec" ]] && exec bash