Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mc
- mkdir -p /home5/djdragon44/.cache/watch ~/.config/.rutorrent1/.session;
- cp ~/.rtorrent.rc ~/.rutorrent1.rc;
- sed -i "s:^directory.*:directory = /home5/djdragon44/.cache:" ~/.rutorrent1.rc;
- sed -i "s:/home5/djdragon44/.cache/watch/rtorrent:/home5/djdragon44/.cache/watch:" ~/.rutorrent1.rc;
- sed -i "s:.config/:.config/.rutorrent1/:" ~/.rutorrent1.rc;
- sed -i "s:scgi_.*:scgi_port = localhost\:$(shuf -i 13000-13500 -n 1):" ~/.rutorrent1.rc;
- sed -i "s:php $(whoami):php rutorrent1:" ~/.rutorrent1.rc;
- mkdir -p ~/www/$(whoami).$(hostname)/$(whoami)/rutorrent1/;
- cp -fr ~/www/$(whoami).$(hostname)/$(whoami)/rutorrent/* ~/www/$(whoami).$(hostname)/$(whoami)/rutorrent1/;
- rm -rf ~/www/$(whoami).$(hostname)/$(whoami)/rutorrent1/share/users/$(whoami);
- rm -rf ~/www/$(whoami).$(hostname)/$(whoami)/rutorrent1/plugins/autodl*;
- sed -i "s:\$scgi_port.*:\$scgi_port = \"$(grep scgi .rutorrent1.rc | awk -F ':' '{print $2}')\";:" ~/www/$(whoami).$(hostname)/$(whoami)/rutorrent1/conf/config.php;
- sed -i "s:\$XMLRPCMountPoint.*:\$XMLRPCMountPoint = \"$(whoami)/rutorrent1/RPC1\";:" ~/www/$(whoami).$(hostname)/$(whoami)/rutorrent1/conf/config.php;
- sed -i "s:\$topDirectory.*:\$topDirectory = \'/home5/djdragon44/.cache\';:" ~/www/$(whoami).$(hostname)/$(whoami)/rutorrent1/conf/config.php;
- sed -i "s:rutorrent/error:rutorrent1/error:" ~/www/$(whoami).$(hostname)/$(whoami)/rutorrent1/conf/config.php;
- echo -e "SCGIMount /$(whoami)/rutorrent1/RPC1 127.0.0.1:$(grep scgi .rutorrent1.rc | awk -F ':' '{print $2}')\n\n" > ~/.apache2/conf.d/rutorrent1.conf;
- echo -e "<Location /$(whoami)/rutorrent1/RPC1>\nAuthName 'rutorrent1'\nAuthType Basic\nAuthBasicProvider file\nAuthUserFile '$HOME/.apache2/rutorrent1_auth'\nRequire valid-user\n</Location>" >> ~/.apache2/conf.d/rutorrent1.conf;
- echo -e "AuthName 'Private'\nAuthType Basic\nAuthBasicProvider file\nAuthUserFile '$HOME/.apache2/rutorrent1_auth'\nRequire valid-user" > ~/www/$(whoami).$(hostname)/$(whoami)/rutorrent1/.htaccess;
- htpasswd -cb ~/.apache2/rutorrent1'_auth' rutorrent1 password1;
- /usr/sbin/apache2ctl -k graceful;
- screen -dm -S rutorrent1 rtorrent -n -o import=~/.rutorrent1.rc;
- (crontab -l ;echo -e "*/5\t*\t*\t*\t*\tps x | grep rutorrent1 | grep -v grep || screen -dm -S rutorrent1 rtorrent -n -o import=~/.rutorrent1.rc && screen -wipe") | crontab -u $(whoami) -
- mc
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement