ipfs-inactive / examples

[ARCHIVED] DEPRECATED — merged into IPFS docs
185 stars 74 forks source link

Interacting with the IPFS daemon running as a user LaunchAgent? #51

Open sockdrawermoney opened 8 years ago

sockdrawermoney commented 8 years ago

If I run the IPFS daemon as a "LaunchAgent" as described here, then start it as described, I see it show up:

➜  ~ launchctl list | grep ipfs
-   127 io.ipfs.go-ipfs

But if I run ipfs swarm peers, I get:

Error: This command must be run in online mode. Try running 'ipfs daemon' first.
Use 'ipfs swarm peers --help' for information about this command

I'm sure I'm misunderstanding something about how this works. :)

whyrusleeping commented 8 years ago

Hrm... I wonder where the ipfs dir gets placed in that case. the CLI might not be looking in the same path as the launchctl manager.

cc @diasdavid @dignifiedquire who know more about OSX Mac OS Than I do

dignifiedquire commented 8 years ago

in theory it should work, but it might be tht the home directory detection fails. Try setting IPFS_PATH="./.ipfs" in the script explicitly (user based scripts run in the user home dir by default)

fubar-coder commented 6 years ago

I have the same problem. It seems that there is a problem when running under a different user account. My setup is as follows:

Everything works as expected when I run ipfs daemon manually in one console window and the other commands in a different console.

Manually setting the IPFS_PATH works too.

falehenrique commented 5 years ago

I had the problem "Error: this command must be run in online mode. Try running 'ipfs daemon' first", because I try exec this with another user in terminal.

tks @fubar-coder