remoteclean

command module
v0.0.0-...-73db231 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

README

remoteclean

Cleanup files when a given remote mount is low on space. It deletes the oldest files in the whitelisted folders.

Requirements

You'll need:

  • Go >= 1.14
  • SSH agent running on the machine, with support for public/private key authentication

Build & configure

Build and copy sample files
go build
cp sample.remoteclean .remoteclean
Edit configuration

Edit the configuration file .remoteclean which is already populated with some sample configuration parameters.

mount mount point to check for available space
space_threshold floating point number representing the GB on which to trigger the deletion of contents
remote information regarding the remote host
     host - hostname or IP address of the machine
     port - port to where the SSH agent is listening
     user - user with which the application should login
     key - location of the private key to use to SSH
     dirs - array representing the directories from which content should be deleted

Add keys

You need to add the private keys used to SSH into both the seedbox and the player machine. You also need to have them already added to your ~/.ssh/known_hosts file. So make sure that you've at least SSH'd to those machines once through your terminal (easier way to add them to the file).

Execute

$ ./remoteclean

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL