1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-10 09:52:20 +08:00
Files
kubo/bin/container_daemon
Lars Gierth 50127b2f58 docker: start daemon with --enable-gc
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-03-21 12:39:53 -04:00

23 lines
462 B
Bash

#!/bin/sh
user=$(whoami)
repo="$IPFS_PATH"
# Test whether the mounted directory is writable for us
if [ ! -w "$repo" 2>/dev/null ]; then
echo "error: $repo is not writable for user $user (uid=$(id -u $user))"
exit 1
fi
ipfs version
if [ -e "$repo/config" ]; then
echo "Found IPFS fs-repo at $repo"
else
ipfs init
ipfs config Addresses.API /ip4/0.0.0.0/tcp/5001
ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/8080
fi
exec ipfs daemon --enable-gc