filebox/README.md

163 lines
4.1 KiB
Markdown
Raw Normal View History

2022-03-17 18:21:27 +01:00
# What is filebox
filebox is an app script made to upload and download files from servers.
I made this tool a long time ago to download files from my seedbox, but
i decided to rewrite it. filebox works on "any" server, and is not
intended to be used only with a seedbox. You can also use it to upload
and download any files to/from your servers... you could then, share your
server "upload" folder with your friends.
# dependencies
- bash
2022-03-24 17:29:51 +01:00
- curl (to check available version)
2022-03-17 18:21:27 +01:00
- rsync
- sshfs
# How to install ?
2022-03-21 17:33:58 +01:00
You can manually copy, folders and files from this repo, or use setup.sh
2022-03-17 18:21:27 +01:00
```
2022-03-21 17:33:58 +01:00
git clone https://git.a-lec.org/echolib/filebox
cd filebox
chmod +x setup.sh
# Install and/or Update repo and filebox
./setup.sh
# Removing filebox
./setup.sh -R
2022-03-17 18:21:27 +01:00
```
# Files and Folders configuration
- /etc/filebox/ (file: filebox.conf (filebox configuration))
- /var/lib/filebox/ (scripts, readme...)
- /usr/local/bin/ (file: filebox (executable))
# How to use it ?
Once installed, start configuring your server using:
```
filebox -C
```
You will be asked to add at first time only LOCAL Folders, one per
category file:
- Music
- Video (Private)
- Video (Public)
- Ebook
- Generic / Document
And filebox will also ask you to add a default server and give its:
- user access
- IP
- Download server Folder
- Upload server folder
- Upload LOCAL Folder
You can also add more servers, using your desired (server name), so that
2022-03-17 18:33:09 +01:00
you can manage several servers.
2022-03-17 18:21:27 +01:00
```
# if no (server name), filebox use (default) first configured server
filebox -C (server name)
```
The server password is not asked by filebox; you will have to write it
each time filebox needs to mount your server folders.
# Private configurations files and folders (created by filebox)
- $HOME/.mnt/filebox/Downloads/(server name) < mount point
- $HOME/.mnt/filebox/Uploads/(server name) < mount point
- $HOME/.config/filebox < (config private files)
## Downloading files
To start downloading files from your server, type:
```
filebox -g
```
A file list will appear with item numbers. You can download one or several
2022-03-17 18:33:09 +01:00
files and folders by answering the question next to the list. If you want
2022-03-17 18:21:27 +01:00
to download item 1 to your local music folder and item 2 to your public
video folder, just answer: 1m 2p
filebox will check for free space before downloading. A reserved 10Go
free space on your local HOME (configurable in /etc/filebox/filebox.conf)
is set.
## Uploading files
To upload ALL files from your (Upload LOCAL Folder)/(server name), to
your specific server folder, type:
```
2022-03-17 18:33:09 +01:00
filebox -s
2022-03-17 18:21:27 +01:00
```
In that (Upload LOCAL Folder)/(server name) you could put all your
torrent files, but whatever you want, so they can be uploaded to your
server.
2022-03-21 17:33:58 +01:00
filebox will check for free space on server before uploading a file. A
reserved 5Go free space on your server (configurable in /etc/filebox/filebox.conf)
2022-03-17 18:21:27 +01:00
is set.
Do not forget to unmount your mounted points using:
```
2022-03-24 17:29:51 +01:00
filebox -u [OPT] (server name)
2022-03-17 18:21:27 +01:00
```
# Help
```
$ filebox [ARGS]
: Upload/Download files to/from servers
It can be easily used with a seedbox
Reserved free space on local disk Default: 10G
Reserved free space on server disk Default: 5G
: No [NAME], use (default)
[ARGS]:
help
: This Help
config | -C [OPT] [NAME]
: Configure access to a server [NAME]
[OPT]
-l : edit file for local folders
-s : edit file for server configuration
send | -s [OPT ][NAME]
: Move Files from (Upload LOCAL Folder)/[name] to Upload server folder
[OPT]
-k : Copy, not move
2022-03-24 17:29:51 +01:00
unmount | -u [OPT] [NAME]
2022-03-17 18:21:27 +01:00
: Unmount directories
[OPT]
dl : Download directory only
ul : Upload Directory Only
get | -g [NAME]
: List and choose files to download from server
2022-03-24 17:29:51 +01:00
-v : Show Installed version
-vv : Show Installed and Available versions
-U : Check and Update filebox
2022-03-17 18:21:27 +01:00
# Items Selector
: L > Load again the list
# How to download items in specific folder according to categorie file
- Add a letter to number selected (i.e. 1e m3)
: d > Generic (also if no letter set)
: m > Music
: e > ebook
: v > Restricted Video
: p > Public Video
```