You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
574 B
Bash
34 lines
574 B
Bash
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
STORJ_ADDRESS=1CT76j4GRhad1CXdngpzVLWjnpVLSGt7Ec
|
|
STORJ_CONFIG=/root/.config/storjshare/config.json
|
|
STORJ_LOG=/root/.config/storjshare/log
|
|
STORJ_STORAGE=/storage
|
|
|
|
if [ "$1" = 'storjshare' ];then
|
|
|
|
storjshare-daemon start
|
|
|
|
if [ ! -s "$STORJ_CONFIG" ];then
|
|
storjshare create \
|
|
--sjcx $STORJ_ADDRESS \
|
|
-o $STORJ_CONFIG --noedit \
|
|
--logfile $STORJ_LOG \
|
|
--size 50GB \
|
|
--storage $STORJ_STORAGE
|
|
|
|
fi
|
|
|
|
storjshare start --config $STORJ_CONFIG
|
|
tail -f $STORJ_LOG
|
|
fi
|
|
|
|
"$@"
|
|
|
|
|
|
|
|
|
|
|