ipfs command permissions
This commit is contained in:
parent
8af6f509f1
commit
e5effa743b
|
@ -451,11 +451,14 @@ function mesh_install_ipfs_go {
|
|||
|
||||
echo '[Unit]' > $IPFS_USER_DAEMON
|
||||
echo 'Description=IPFS go daemon' >> $IPFS_USER_DAEMON
|
||||
echo 'After=syslog.target' >> $IPFS_USER_DAEMON
|
||||
echo 'After=network.target' >> $IPFS_USER_DAEMON
|
||||
echo '' >> $IPFS_USER_DAEMON
|
||||
echo '[Service]' >> $IPFS_USER_DAEMON
|
||||
echo 'Type=simple' >> $IPFS_USER_DAEMON
|
||||
echo "ExecStart=$IPFS_PATH/ipfs daemon" >> $IPFS_USER_DAEMON
|
||||
echo 'Restart=on-failure' >> $IPFS_USER_DAEMON
|
||||
echo 'RestartSec=10' >> $IPFS_USER_DAEMON
|
||||
echo 'RestartSec=60' >> $IPFS_USER_DAEMON
|
||||
echo '' >> $IPFS_USER_DAEMON
|
||||
echo '[Install]' >> $IPFS_USER_DAEMON
|
||||
echo 'WantedBy=default.target' >> $IPFS_USER_DAEMON
|
||||
|
@ -539,7 +542,7 @@ function install_ipfs_go {
|
|||
fi
|
||||
|
||||
# initialise
|
||||
chmod +x $IPFS_PATH/ipfs
|
||||
chmod 755 $IPFS_PATH/ipfs
|
||||
su -c "$IPFS_PATH/ipfs init -b 2048" - $MY_USERNAME
|
||||
if [ ! -d /home/$MY_USERNAME/.ipfs ]; then
|
||||
echo "IPFS could not be initialised for user $MY_USERNAME"
|
||||
|
|
|
@ -985,6 +985,7 @@ function setup_ipfs {
|
|||
IPFS_COMMAND=$IPFS_PATH/ipfs
|
||||
IPFS_PUBLIC=/home/$MY_USERNAME/.ipfs-public
|
||||
|
||||
chmod 755 $IPFS_COMMAND
|
||||
su -c "systemctl --user enable ipfs" - $MY_USERNAME
|
||||
|
||||
if [ -f $CURRENT_BLOG_INDEX ]; then
|
||||
|
@ -1033,7 +1034,7 @@ function setup_ipfs {
|
|||
shred -zu /home/$MY_USERNAME/.ipfs-public
|
||||
fi
|
||||
|
||||
chmod +x $IPFS_COMMAND
|
||||
chmod 755 $IPFS_COMMAND
|
||||
su -c "$IPFS_COMMAND init -b $IPFS_KEY_LENGTH" - $MY_USERNAME
|
||||
if [ ! -d /home/$MY_USERNAME/.ipfs ]; then
|
||||
echo "IPFS could not be initialised for user $MY_USERNAME" >> $INSTALL_LOG
|
||||
|
|
Loading…
Reference in New Issue