Calling all nix gurus: Idea for package/addon semi-automated scripts

dsouvik215

Member
May 25, 2018
896
0
16
rutorrent is amazing, we all know it.

It is by far the best seedbox software around. It looks great, has amazing features and performs well. The biggest issue with rutorrent currently is setup. A good number of people who try it can't get it working easily and give up. Others get it working somewhat but have problems.

I'd like to ease thier suffering some. What i'd like to do is write/help write a script (or set of scripts) to help automate some of the install and config.

This would likely exclude rtorrent configuration and installation (at least in the beginning) But should help with:

downloading rutorrent via svn/http
adding unix users
creating .rtorrent.rc files
creating start up scripts or crontabs for @boot setup
configuring webservers (for apache this means creating a vhost or a .conf alias file with authentication, for lighttpd this means using awk scripts to check for options, enable them if they are off, add scgi mounts, so on and so forth. for cherokee about the same. the webserver config may be the hardest part but no reason it's not doable)

The entire script should be interactive (i.e., it would ask you a question like "how many users do you wish to install with rutorrent"
then when you answer, lets say you put 3, it would be like "what would you like to name user 1, what is user1's download dir, what would you like to name user2.

Then it would add the unix users to the os via whatever tool for that os, it would create thier .rtorrent.rc, perhaps a crontab to auto-start rtorrent for that user (or use some other automated setup script)

after that it would create the rutorrent settings and what not....i'm sure you get the idea.


so i need some help realizing this.
anyone interested let me know.
 

das329717

Member
May 25, 2018
928
0
16
wow , that sounds good .. would really bring this to the next level ;-)

Unfortunately I am not able to help with the making.
But I am willing to (dummy) test this
 

jith45

Member
May 25, 2018
960
0
16
I know that there are people working on this, seedbox hosters, but I'm not sure if they would be willing to share it, I got 2 that I'm helping test.

The script wouldn't be to hard, only things I can think of that would be troubling is logging in as the user and starting ruTorrent (can be done through keys though) and having it so it wouldn't break at the release of 3.0 (since stable will become 3.0, and http://rutorrent.googlecode.com/svn/tags/rtorrent/2.8/ seems to be outdated last I checked).

I'll see if I can find out more information for you.

HS

PS: I know http://chogie.info/ mentioned something about this, but I don't think it went as in dept as multi-user.
 

somus1735

Member
May 25, 2018
833
0
16
It is stable, I agree with that, but once its release as stable, the svn links will be changed, and that means scripts will be broken. And since I'm guessing 3.0 will be moved out of branches, any 3.0 svns will be broken.

Well I doubt they would be editing ruTorrent, I'm guessing its just a bash script to run the commands, so it wouldn't fall under any licensing.

"Something that can work with any webserver..." would be pretty difficult I imagine unless you used the RPC plugin. Scripts that are being made now are ones meant for a clean install, a script that will install a web server and everything else that you need.

HS
 

shwetha17

Member
May 24, 2018
785
0
16
there is no reason to think that the svn link for branch/3.0/ will change.

There might be a reason to expect the svn/trunk/ will change though, so no, that doesn't hold up.

as far as the script falling under licensing, i didn't say that, go back and read what i wrote


and no, i disageee, it is absolutely trivial to add RPC mounts to apache and cherokee, and only slightly more difficult to add them to lighttpd, and that slight difference is only due to a more difficult syntax.
 

das329717

Member
May 25, 2018
928
0
16
I'm currently building some shellscripts for multiuser generation to make rutorrent servers easier to administer/manage. I'm doing it for slackware because, well, that's the *nix flavour I'm using.

Example: addtorrentuser tigereye

This script will do the following when finished:
  • Run adduser to create a new unix user
  • Add the user to the rtorrent system group to give them appropriate permissions to read/write the media share
  • Read the /etc/httpd/extra/httpd-scgi.conf file to determine the highest SCGI mount port currently allocated
  • Add a new SCGI mount port to the httpd-scgi.conf file using the current-highest-port + 1
  • Copy a pre-made .rctorrent.rc file to the new user's ~ directory
  • Modify the new user's .rctorrent.rc file with the appropriate SCGI mount port
  • Copy the RUTorrent conf files to the new user's folder
  • Modify the config.php file with the appropriate SCGI mount port
  • run htdigest to add the user to apache's AuthDigest userfile to give them access to the site
  • Copy the rc.rtorrent.default system startup script to rc.rtorrent.newusername (this is a script I modified to start a new screen on system boot. I had to adapt the existing scripts found online to slackware)
  • Modify the rc.rtorrent.newusername script to update it with the proper username
whew

Unfortunately, I know that slackware is a bit different than most of the other *nix variants out there, so this script will need to be customized for each variant.
Perhaps this script can be autogenerated from rutorrent's "./configure" or "make" commands so it's output in the proper format for the current system architecture.

One change I had to make to the scripts I found online was the "su -c" command.
For most unixes you do [su -c "command strings" username]
For slackware you do [su username -c "command strings"]
I'm sure there are many other subtle variations for other commands that would need to be tweaked.

This is not an easy set of semi-automated scripts to write.
I'll gladly add my small pieces into the pile though smiley.gif
 

jith45

Member
May 25, 2018
960
0
16
i'm sure it can be modified...anything is helpful and anything is a good place to start.
 

somus1735

Member
May 25, 2018
833
0
16
Ok Finally ready to release this:

4tsl6e.png

b8mziw.png

This is an example when choosing 'none' for all options
2wrj3vt.png

updated..
...added script 'iptables' which will block
  • ssh attacks
  • port-scans
  • trace-routes
  • syn flooding
  • syn|ack|fin|xmas|null scans
and allows ports (configurable):
  • WEB :80
  • SSL :443
  • FTP :21
  • SSH :22
  • RTorrent
everything else - Read ChangeLog

iRC Contact: chat.freenode.net/+7000
#rtorrent
/msg skydrome


Decided to put it up on MediaFire until we can get a svn repo organized:
Download it Here

I know wongslong would be interested in porting it to bsd and id also like to have it compatible with rpm based distros. All in good time though.

Current Status: Testing for v1.0

If you need an x86 binary just ask
 

das329717

Member
May 25, 2018
928
0
16
Decided to put it up on MediaFire until we can get a svn repo organized:
Download it Here
Wanted to dowload it , but getting this msg :

This file is currently set to private.

When a file is set to private by its owner only the owner of the file can access it. If you are the owner of the file please log into your account to access this file. If you believe you have reached this page in error, please contact support.
 

somus1735

Member
May 25, 2018
833
0
16
Wanted to dowload it , but getting this msg :

This file is currently set to private.

When a file is set to private by its owner only the owner of the file can access it. If you are the owner of the file please log into your account to access this file. If you believe you have reached this page in error, please contact support.
Oops Sorry, its Fixed Now
 

das329717

Member
May 25, 2018
928
0
16
I cannot seem to get the auto installer to work. Using Debian 5.0.4 (x86) it looks like it wants to install a ubuntu version of lighttpd?

Quote
Package: lighttpd : Version: 1.4.26-1.2~backport1~ppa1~jaunty1



I also get an error when it begins installation.

Quote
iNSTALLiNG BASE PACKAGES... E: Package libft-perl has no installation candidate
Error: failed​



edit: I have version 0.9.5 beta of the auto installer.
 

jith45

Member
May 25, 2018
960
0
16
could i get some help with this please i downloaded teh files onto my server but cant even get it to start i have a fresh ubuntu install
 

somus1735

Member
May 25, 2018
833
0
16
and when i try runnning sudo ./installer it just says

bash: ./installer: cannot execute binary file
 

das329717

Member
May 25, 2018
928
0
16
I cannot seem to get the auto installer to work. Using Debian 5.0.4 (x86) it looks like it wants to install a ubuntu version of lighttpd?

Quote
Package: lighttpd : Version: 1.4.26-1.2~backport1~ppa1~jaunty1


I also get an error when it begins installation.

Quote
iNSTALLiNG BASE PACKAGES... E: Package libft-perl has no installation candidate
Error: failed
Fixed
Will update with x86 binary soon :: x86 Added
and when i try runnning sudo ./installer it just says

bash: ./installer: cannot execute binary file
What Distro and what architecture?
 

shwetha17

Member
May 24, 2018
785
0
16
do u have msn mate if so wanna add me so u can see if my servers setup correctly please as i am fairly new to linux still


how do i conenct to it mate


says i686

lol gone quiet
 

das329717

Member
May 25, 2018
928
0
16
im useing •Ubuntu 8.04 LTS Desktop free
not sure of which architecre how would i find that out
type uname -m in terminal
do u have msn mate if so wanna add me so u can see if my servers setup correctly please as i am fairly new to linux still
iRC Contact: chat.freenode.net/+7000
#rtorrent
/msg skydrome


And please use the modify post button instead of double posting
Also, original post updated with newer screenshots
 

jith45

Member
May 25, 2018
960
0
16
right got it runnning now but when it gets to libtorrnt part i get

error:libtorrent build failed