Check that ipfs was installed
This commit is contained in:
parent
35617f5e1e
commit
79a26d1a38
|
@ -215,8 +215,12 @@ function install_ipfs_js {
|
||||||
|
|
||||||
IPFS_PATH=/usr/local/bin
|
IPFS_PATH=/usr/local/bin
|
||||||
|
|
||||||
|
if [ ! -f $IPFS_PATH/jsipfs ]; then
|
||||||
|
exit 637292
|
||||||
|
fi
|
||||||
|
|
||||||
# initialise
|
# initialise
|
||||||
su -c "$IPFS_PATH/ipfs init -b 4096" - $MY_USERNAME
|
su -c "$IPFS_PATH/jsipfs init -b 4096" - $MY_USERNAME
|
||||||
if [ ! -d /home/$MY_USERNAME/.ipfs ]; then
|
if [ ! -d /home/$MY_USERNAME/.ipfs ]; then
|
||||||
echo "IPFS could not be initialised for user $MY_USERNAME"
|
echo "IPFS could not be initialised for user $MY_USERNAME"
|
||||||
exit 7358
|
exit 7358
|
||||||
|
@ -261,7 +265,7 @@ function install_ipfs_js {
|
||||||
systemctl restart ${IPFS_DAEMON_NAME}
|
systemctl restart ${IPFS_DAEMON_NAME}
|
||||||
|
|
||||||
if [ -d /etc/avahi ]; then
|
if [ -d /etc/avahi ]; then
|
||||||
su -c "echo $($IPFS_PATH/ipfs id | grep '\"ID\":' | awk -F '\"' '{print $4}') > /tmp/ipfsid" - $MY_USERNAME
|
su -c "echo $($IPFS_PATH/jsipfs id | grep '\"ID\":' | awk -F '\"' '{print $4}') > /tmp/ipfsid" - $MY_USERNAME
|
||||||
if [ ! -f /tmp/ipfsid ]; then
|
if [ ! -f /tmp/ipfsid ]; then
|
||||||
echo 'No IPFS identity was created'
|
echo 'No IPFS identity was created'
|
||||||
exit 37895
|
exit 37895
|
||||||
|
|
Loading…
Reference in New Issue