Add upload env stuff to scripts

This commit is contained in:
Marcin Jachymiak 2020-03-02 18:05:45 -05:00
parent 88dea28fda
commit 32727c07ea
3 changed files with 12 additions and 1 deletions

View File

@ -116,3 +116,5 @@ export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/
set -o allexport set -o allexport
source ~/.sia/sia.env source ~/.sia/sia.env
set +o allexport set +o allexport
alias siac-upload="source ~/.sia/source-upload.sh; siac --addr 'localhost:9970'"

View File

@ -65,10 +65,13 @@ cd ../
yarn yarn
yarn build yarn build
# Enable the systemd service # Setup systemd files
cd $cwd cd $cwd
mkdir -p ~/.config/systemd/user mkdir -p ~/.config/systemd/user
cp siad.service ~/.config/systemd/user/siad.service 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 mkdir -p ~/.sia
cp sia.env ~/.sia/ cp sia.env ~/.sia/
cp sia.env ~/.sia/sia-upload.env

6
setup-scripts/source-upload.sh Executable file
View File

@ -0,0 +1,6 @@
#! /usr/bin/env bash
set -e
set -o allexport
source ~/.sia/sia-upload.env
set +o allexport