Skip to content

Instantly share code, notes, and snippets.

@pandanote-info
Last active December 6, 2021 12:39
Show Gist options
  • Save pandanote-info/81982c96f73b3954a2226c647d682a81 to your computer and use it in GitHub Desktop.
Save pandanote-info/81982c96f73b3954a2226c647d682a81 to your computer and use it in GitHub Desktop.
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