#!/sbin/openrc-run
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

export IPFS_PATH=${IPFS_PATH:-/var/lib/ipfs/.ipfs}

pidfile="/run/ipfs.pid"
command="/usr/bin/ipfs"
command_args="daemon --enable-gc --migrate"
command_background=yes
output_log="/var/log/ipfs/ipfs.log"
error_log="/var/log/ipfs/ipfs.err"
command_user="ipfs:ipfs"
start_stop_daemon_args="--wait 1000"

depend() {
	need net
}
