From 32727c07ea4abbbc4b036cbdae0662b59a2377f6 Mon Sep 17 00:00:00 2001 From: Marcin Jachymiak Date: Mon, 2 Mar 2020 18:05:45 -0500 Subject: [PATCH] Add upload env stuff to scripts --- setup-scripts/bashrc | 2 ++ setup-scripts/setup.sh | 5 ++++- setup-scripts/source-upload.sh | 6 ++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 setup-scripts/source-upload.sh diff --git a/setup-scripts/bashrc b/setup-scripts/bashrc index 61d41906..b7acc23d 100644 --- a/setup-scripts/bashrc +++ b/setup-scripts/bashrc @@ -116,3 +116,5 @@ export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/ set -o allexport source ~/.sia/sia.env set +o allexport + +alias siac-upload="source ~/.sia/source-upload.sh; siac --addr 'localhost:9970'" diff --git a/setup-scripts/setup.sh b/setup-scripts/setup.sh index b1464478..f4740abd 100755 --- a/setup-scripts/setup.sh +++ b/setup-scripts/setup.sh @@ -65,10 +65,13 @@ cd ../ yarn yarn build -# Enable the systemd service +# Setup systemd files cd $cwd mkdir -p ~/.config/systemd/user cp siad.service ~/.config/systemd/user/siad.service +cp siad-upload.service ~/.config/systemd/user/siad-upload.service +# Setup files for storing environment variables mkdir -p ~/.sia cp sia.env ~/.sia/ +cp sia.env ~/.sia/sia-upload.env diff --git a/setup-scripts/source-upload.sh b/setup-scripts/source-upload.sh new file mode 100755 index 00000000..198d5802 --- /dev/null +++ b/setup-scripts/source-upload.sh @@ -0,0 +1,6 @@ +#! /usr/bin/env bash +set -e + +set -o allexport +source ~/.sia/sia-upload.env +set +o allexport