===============================================================================================================
Finished installing IPFS :)

THE FOLLOWING HELP TEXT CAN ALSO BE FOUND AT /tmp/ipfs-help.txt
(WARNING: Your /tmp folder may be cleared on reboot, or on a schedule)

It looks like this is the initial install and not an upgrade, so here's some information to help you get started:

---------- Step 1 ----------

Copy or screenshot this block of help information into a text editor so that you don't lose it while following
the instructions.

THE FOLLOWING HELP TEXT CAN ALSO BE FOUND AT /tmp/ipfs-help.txt
Just run:    cat /tmp/ipfs-help.txt

---------- Step 2 ----------

Add IPFS_PATH to your .bashrc / .zshrc / whatever init file your shell uses:

    echo -e '\nexport IPFS_PATH="/var/lib/ipfs"\n' >> ~/.bashrc
    echo -e '\nexport IPFS_PATH="/var/lib/ipfs"\n' >> ~/.zshrc

Repeat the above step for: your non-admin user (if you have one), the root account (if you have access), and any other accounts
that you commonly use, and want to be able to use IPFS from them.

---------- Step 3 ----------

Run the IPFS_PATH export command in your open shell session(s), so that you don't need to restart them to be able to use IPFS:

    export IPFS_PATH="/var/lib/ipfs"

If you use the 'zsh' shell, you may need to run 'rehash' to enable command completion for IPFS.

File/folder locations:

    IPFS data directory (stores the config, data blocks, lock files, etc.):                 /var/lib/ipfs/
    IPFS user home directory (not used for much, just the homedir for the user 'ipfs')      /var/spool/ipfs/
    Symlink config file for convenience:                                                    /etc/ipfs.json
    IPFS systemd service file:                                                              /lib/systemd/system/ipfs.service
    IPFS binary 'ipfs' location:                                                            /usr/bin/ipfs

---------- Step 4 ----------

If you want to change the data directory for IPFS, here are the commands:

    systemctl stop ipfs
    # Set this to the new location for the IPFS datadir (no ending slash)
    export IPFS_PATH="/data-ipfs"
    rsync -avh --progress /var/lib/ipfs "${IPFS_PATH}/"

    # This will open up a seemingly blank editor, for you to make overrides without editing the original service file.
    systemctl edit-unit ipfs

    # BEGIN CONTENT TO PUT IN THE EDITOR
        [Service]
        # To replace a setting, you first need to blank it, then you can set the new value.
        # By default in edit-unit, settings will be appended to, unless you blank them first.
        Environment=
        Environment=IPFS_PATH="/data-ipfs"

    # END CONTENT FOR edit-unit EDITOR

    # A quick way to replace the original IPFS_PATH in both .bashrc and .zshrc for your user and root
    sed -Ei 's#/var/lib/ipfs#'${IPFS_PATH}'#g' ~/.bashrc ~/.zshrc 
    sudo sed -Ei 's#/var/lib/ipfs#'${IPFS_PATH}'#g' /root/.bashrc /root/.zshrc 
    
    # Reload systemd so that it notices the changes to the .service
    systemctl daemon-reload
    # Start the IPFS service again
    systemctl restart ipfs

------------------------------------

Please make sure that you add IPFS_PATH to your shell init files, as well as export it in your current
shell session(s), or you won't be able to use IPFS!

Export IPFS_PATH in your current session + add IPFS_PATH to your .bashrc / .zshrc / whatever init file your shell uses:

    export IPFS_PATH="/data-ipfs"
    echo -e '\nexport IPFS_PATH="/var/lib/ipfs"\n' >> ~/.bashrc
    echo -e '\nexport IPFS_PATH="/var/lib/ipfs"\n' >> ~/.zshrc


THE FOLLOWING HELP TEXT CAN ALSO BE FOUND AT /tmp/ipfs-help.txt
Just run:    cat /tmp/ipfs-help.txt
(WARNING: Your /tmp folder may be cleared on reboot, or on a schedule)

===============================================================================================================
