158 lines
4.1 KiB
Markdown
158 lines
4.1 KiB
Markdown
|
# 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
|
||
|
- rsync
|
||
|
- sshfs
|
||
|
|
||
|
# How to install ?
|
||
|
Create folders from list below and to avoid sudo for non root user,
|
||
|
use chown. Then, chmod 755 filebox so that it can be started
|
||
|
|
||
|
```
|
||
|
# Create and own folders
|
||
|
sudo mkdir -p /etc/filebox && chown -R $USER:$USER /etc/filebox
|
||
|
sudo mkdir -p /var/lib/filebox && chown -R $USER:$USER /var/lib/filebox
|
||
|
|
||
|
# Copy executable filebox file:
|
||
|
sudp cp filebox /usr/local/bin/filebox
|
||
|
sudo chown $USER:$USER /usr/local/bin/filebox
|
||
|
sudo chmod 755 /usr/local/bin/filebox
|
||
|
```
|
||
|
|
||
|
# 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
|
||
|
you can
|
||
|
|
||
|
```
|
||
|
# 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
|
||
|
files and folder by answering the question next to the list. If you want
|
||
|
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:
|
||
|
|
||
|
```
|
||
|
filebox -S
|
||
|
```
|
||
|
|
||
|
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.
|
||
|
|
||
|
filebox will check for free space on server before uploading. A reserved
|
||
|
5Go free space on your server (configurable in /etc/filebox/filebox.conf)
|
||
|
is set.
|
||
|
|
||
|
Do not forget to unmount your mounted points using:
|
||
|
|
||
|
```
|
||
|
filebox -U [OPT] (server name)
|
||
|
```
|
||
|
|
||
|
# 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
|
||
|
|
||
|
unmount | -U [OPT] [NAME]
|
||
|
: Unmount directories
|
||
|
[OPT]
|
||
|
dl : Download directory only
|
||
|
ul : Upload Directory Only
|
||
|
|
||
|
get | -g [NAME]
|
||
|
: List and choose files to download from server
|
||
|
|
||
|
# 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
|
||
|
```
|