This repository has been archived on 2020-09-11. You can view files and clone it, but cannot push or open issues or pull requests.
dockerfiles/storj/dockerfiles/docker-entrypoint.sh

34 lines
574 B
Bash
Raw Permalink Normal View History

2017-05-02 11:52:07 +00:00
#!/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
"$@"