Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
IPFS daemonの起動・終了を実行するためのshell script。
#!/bin/bash
#
# See https://pandanote.info/?p=8205 for details.
#
MODE="start"
if [ -n "$1" ]; then
MODE="stop"
fi
if [ ${MODE} != "stop" ]; then
su - panda -c "/usr/local/bin/ipfs daemon --enable-namesys-pubsub" 2>&1
else
pkill --signal SIGINT ipfs
fi
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment