
The data is retained for the length of your retention window. Traces can be bookmarked, shared, and reviewed by your team.
Run space gremlin as root full#
The Trace view shows you a flame graph of the full trace and below that, each span is shown in a hierarchy, allowing you to see the parent-child relationship of all the spans in the trace (spans with errors are shown in red).Ĭlicking a span shows details in the right panels, based on the span’s metadata. * * * * * sudo /opt/bin/docker_example.You use the Trace view to see a trace from beginning to end of a request. Now you should be able to add this script with sudo to crontab, and it should run with NOPASSWD. Su $user_account -c 'ipfs files cp "/ipfs/$(ipfs add -Q "$1")" "$2"' _ "$local_file" "$ipfs_file" # su $user_account -c 'echo whoami: $1, su: $(id -nu)' _ $(id -nu) Ipfs_file=/Helium/Snapshots/2021/$bin_fileĭocker exec validator miner snapshot take "/var/data/$bin_file" Local_file=$HOME/validator_data/$bin_file User_account=$SUDO_USER || user_account=$(id -nu)

# Exit immediately on non-zero exit status. We name the script docker_example.sh, as shown in the sudo example: #!/bin/bash scrip: line 34: ipfs: command not foundįirst, you need to create a sudo configuration for your script, in this example, we place it in /etc/sudoers.d with permission 440: Cmnd_Alias CMDS = /opt/bin/docker_example.sh rw-r-r- 1 root root 15 Nov 1 05:17 /home/tester/validator_data/tmpfil #ipfs files cp /ipfs/$(ipfs add -Q ) "/Helium/Snapshots/2021/"Ī script pretending to be the docker command line: #!/bin/bashĮcho "docker's world" > "/home/tester/validator_data/tmpfil"Ĭhown root:root "/home/tester/validator_data/tmpfil" usr/local/bin/ipfs files cp /ipfs/$(/usr/local/bin/ipfs add -Q $localfile) $ip Localfile="/home/useraccount/validator_data/$.bin" Sudo docker exec validator miner snapshot take /var/data/$dtt
Run space gremlin as root how to#
So my question is how to run the IPFS command as my original user from within the root script. I have tried to switch accounts in the middle of the script but it seems to kill it. This is because it is trying to run it as root when the configuration is in my useraccount. The command to do this is: ipfs files cp /ipfs/$(ipfs add -Q $localfile) $ipĪt the moment I get the following error: Error: no IPFS repo found in /root/.ipfs. My next step is to take this file and copy it to IPFS so I can share it. The command in the script is as follows: sudo docker exec validator miner snapshot take /var/data/$dttĪfter this, the command generates a file like this ' 30-10-2021T233752.bin'.

useraccount ALL=(ALL:ALL) NOPASSWD:/home/useraccount/validator_data/snapshotmaker.sh

I have edited the /etc/sudoers file to allow me to run this script as root. I have a bash script that needs to run as root to accomplish a task in this case it is to make the validator take a snapshot of the Helium blockchain.
