ago 022019
 

rtinst

1. Introduction

Seedbox installation

rtorrent, rutorrent, nginx, vsftpd, and autodl-irssi will be installed and configured.

It takes about 10 minutes to run, depending on your server setup.

After you have run the script and everything is working, I suggest a reboot, the script does not automate this reboot, you need to do it manually using the reboot command.

As well as installing the various applications previously mentioned, a suite of scripts, will be available to automate a number of tasks for the user and also for the admin. See sections 3 and 4 of this guide for further details.

2. Main Script

If you haven’t already install rtinst, it will take a few seconds.

Run the script from root, or if you have a sudo user already set up you can run it from there. If for some reason it is interrupted you can run it again to completion. Running the script multiple times will not cause any problems.

To run main script:

rtinst

or if you run it from a non-root sudo user:

sudo rtinst

The script will assign a random ssh port for security purposes. It will display this on the screen when it has finished running and write it to ~/rtinst.info

IMPORTANT: NOTE THE NEW SSH PORT AND MAKE SURE YOU CAN SSH INTO YOUR SERVER BEFORE CLOSING THE EXISTING SESSION

For security the script assigns ftp to a random port number. You will need to use this port number in your ftp client. It will display the port number at the end of the script, and will also write it to ~/rtinst.info

To access that information just use the following command

cat ~/rtinst.info

There are a number of options that can be used when running the script.

2.1 Main Script Options

-d, –dload

Enables http download of content

-l, –log

Enables logging to ~/rtinst.log

-t, –ssh-default

Sets the ssh port to its default 22

-r, –rutorrent-stable

Installs ‘stable’ rutorrent as opposed to the latest master build, this is default setting, from rtinst v1.4

-m, –rutorrent-master

Installs the latest master build of rutorrent as opposed to latest ‘stable’ release, this is the default setting prior to rtinst v1.4, and this option is only available from v1.4

-y, –force-yes

Will automatically accept the IP address as detected, will automatically skip rtorrent/libtorrent install if an existing installation is detected, and will generate a random password for rutorrent, unless -w, –webpass is also used to specify a web password.

-u, –user

names the user to be primary rtorrent user, can be an existing user or script will create a new user, for example if the user name is sally then the option would be ‘-u sally’

-p, –password

Sets the unix password, this only applies if a new user is created. It will not change the password of an existing user.

-w, –webpass

Sets the web password for the user. This is the password used by rutorrent, and is not the same as the unix account password

2.2 Example Commands

If we want to create a new user called horatio (unix password will be admiral, and the web password will be trafalgar), with out any further interaction, and we will create a log.

rtinst -yl -u horatio -p admiral --webpass trafalgar

In this example we are running using sudo from an existing user but we wish to keep the ssh port at 22 and use the latest master build version of rutorrent

sudo rtinst --ssh-default --rutorrent-master

or

sudo rtinst -tm

3. Admin Scripts

A number of additional scripts will be installed that carry out a variety of useful functions. These will be installed by the main script. So you don’t need to remember all the script names you can run rtadmin which will, present a menu to launch the other scripts listed in this section.

sudo rtadmin

All the scripts are downloaded to /usr/local/bin

3.1 rtsetup

This will install or update all the rtinst scripts making sure you have the latest versions:

sudo rtsetup

NOTE: Prior to rtinst v1.4 this was done by rtgetscripts

3.2 rtadduser

This will add new users. Ensuring there are no conflicts with the existing user ports. You can use it to create brand new users, or reset the config on existing users. If you use it on an existing user, you will NOT lose any torrents, files, of autodl-filters. It will just reset the ports used. To run this:

sudo rtadduser

and enter the information asked for.

3.2.1 rtadduser options

rtadduser can be run with options to minimise further user interaction. Useful if, for example, you wish to run the command from another script.

-u, –user

names the user to be added, can be an existing user or script will create a new user, for example if the user name is robert then the option would be ‘-u robert’

-p, –password

Sets the unix password, this only applies if a new user is created. It will not change the password of an existing user.

-w, –webpass

Sets the web password for the user. This is the password used by rutorrent, and is not the same as the unix account password

-s, –ssh-access

Adds the user to sshuser group giving them ssh access

-n, –no-ssh

Does not add them to the sshuser group, meaning they will not be able to connect via ssh. Note: If they are an existing user belonging to the sshuser group, this option will not remove them from that group

3.3 rtremove

WARNING: This will completely remove a user wiping all their config and data, and removing them from the system. To run this:

sudo rtremove

and enter the user name when asked

3.4 rtdload

This script will enable or disable https download

To run:

sudo rtdload

It will tell you the current status, and ask if you want to change it.

If enabled you can access at https://SERVER_IP/download/user_name

3.5 rtupdate

This script can upgrade, (or downgrade), the libtorrent/rtorrent version installed. To run this:

sudo rtupdate

3.6 rutupgrade

This script upgrades Rutorrent. It retains all your config and settings, as well as providing a rollback capability.

From rtinst v1.5 options are available to skip user interaction:

-y, –force-yes

skips user interaction if used with no other options will install latest rutorrent stable release

-m, –rutorrent-master

will install the master build of rutorrent

-o, –restore-old

if available will restore the backup of rutorrent

To run this:

sudo rutupgrade

3.7 rtwebmin

This will install webmin, (if not already installed), and configure nginx as a reverse proxy allowing you to access webmin using https://SERVER-IP/webmin To run this:

sudo rtwebmin

3.8 rtsslcert

This will generate self signed ssl certificates, used by vsftpd and nginx. Can be run with -d option to cut out user interaction, or with -y which will force the generation of new certificates, even if the script determines they are not necessary. Can include an IP address as an argument or the script will determine the IP address, as well as the DN itself

sudo rtsslcert

4. User Scripts

The scripts in this section can be run by any user other than root. They cannot be run by root as they are not applicable to root.

4.1 rtpass

This will allow user to change their rutorrent password. to run this:

rtpass

4.2 rt

This script can stop, start, or restart rtorrent or irssi. Use the arguments stop start or restart, with no arguments it will tell tell you if rtorrent is running or not

examples:

rt
rt stop
rt start
rt restart

If you use the option -i it will switch to irssi

rt -i
rt -i stop
rt -i start
rt -i restart

https://github.com/arakasi72/rtinst/wiki/Guide#21-main-script-options

Sorry, the comment form is closed at this time.