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