Attributes
Includes Deno configuration
Current version released
3 years ago
Read before using
Dependencies
deno. See installation guide
To add deno to the path, after installing it.
nano ~/.bashrc.- Add the following two lines at the end or edit PATH accordingly if it already exists:
export DENO_INSTALL="/root/.deno"export PATH="$DENO_INSTALL/bin:$PATH", but substitute/rootwith the directory in which deno is installed. - Save and close.
cd.. .bashrc.
How to use
- Clone the repository in your server and change directory to it.
- Change to this branch with
git checkout deno. - Copy
constants.example1.tstoconstants.ts:cp constants.example1.ts constants.ts. - Modify
constants.tsto suit your needs. - Run
deno task run --helpto see the possible commands.
If you want to update the code, run git pull.
Using the script
To run the script
deno task runTo run the script in a specific directory
deno task run --cwd /path/to/directoryTo copy some shardâs files from a node to another
deno task run copy [fromNodeIndex] [toNodeIndex] [...shards=[beacon]]Examples
- Copy the beacon shard from node 0 to node 1
deno task run copy 0 1- Copy the beacon and shard2 from node 0 to node 1
deno task run copy 0 1 beacon shard2- You could also just use the shard index
deno task run copy 0 1 beacon 2To move some shardâs files from a node to another
It uses the same syntax as copy.
deno task run move [fromNodeIndex] [toNodeIndex] [...shards=[beacon]]To get the status and total files of each nodeâs shards
deno task run info [...nodeIndexes=all]Examples
- Get the status of all nodes
deno task run info- Get the status of node 0 and 1
deno task run info 0 1Using crontab
With crontab you can configure the script to run every day.
- Run
crontab -e - Write
0 0 * * * deno task --cwd /root/Duplicated-files-cleaner-Incognito runat the end of the file, modifying the path if yours is different. I recommend runnig the command before to see if it works.
Troubleshooting
If you run into problems, you can safely delete the file located at db/database.db and try again. If that doesnât
solve the problem, open an issue.