Advertisement
Guest User

Untitled

a guest
Dec 10th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.29 KB | None | 0 0
  1. mc
  2. mkdir -p /home5/djdragon44/.cache/watch ~/.config/.rutorrent1/.session;
  3. cp ~/.rtorrent.rc ~/.rutorrent1.rc;
  4. sed -i "s:^directory.*:directory = /home5/djdragon44/.cache:" ~/.rutorrent1.rc;
  5. sed -i "s:/home5/djdragon44/.cache/watch/rtorrent:/home5/djdragon44/.cache/watch:" ~/.rutorrent1.rc;
  6. sed -i "s:.config/:.config/.rutorrent1/:" ~/.rutorrent1.rc;
  7. sed -i "s:scgi_.*:scgi_port = localhost\:$(shuf -i 13000-13500 -n 1):" ~/.rutorrent1.rc;
  8. sed -i "s:php $(whoami):php rutorrent1:" ~/.rutorrent1.rc;
  9. mkdir -p ~/www/$(whoami).$(hostname)/$(whoami)/rutorrent1/;
  10. cp -fr ~/www/$(whoami).$(hostname)/$(whoami)/rutorrent/* ~/www/$(whoami).$(hostname)/$(whoami)/rutorrent1/;
  11. rm -rf ~/www/$(whoami).$(hostname)/$(whoami)/rutorrent1/share/users/$(whoami);
  12. rm -rf ~/www/$(whoami).$(hostname)/$(whoami)/rutorrent1/plugins/autodl*;
  13. sed -i "s:\$scgi_port.*:\$scgi_port = \"$(grep scgi .rutorrent1.rc | awk -F ':' '{print $2}')\";:" ~/www/$(whoami).$(hostname)/$(whoami)/rutorrent1/conf/config.php;
  14. sed -i "s:\$XMLRPCMountPoint.*:\$XMLRPCMountPoint = \"$(whoami)/rutorrent1/RPC1\";:" ~/www/$(whoami).$(hostname)/$(whoami)/rutorrent1/conf/config.php;
  15. sed -i "s:\$topDirectory.*:\$topDirectory = \'/home5/djdragon44/.cache\';:" ~/www/$(whoami).$(hostname)/$(whoami)/rutorrent1/conf/config.php;
  16. sed -i "s:rutorrent/error:rutorrent1/error:" ~/www/$(whoami).$(hostname)/$(whoami)/rutorrent1/conf/config.php;
  17. 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;
  18. 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;
  19. echo -e "AuthName 'Private'\nAuthType Basic\nAuthBasicProvider file\nAuthUserFile '$HOME/.apache2/rutorrent1_auth'\nRequire valid-user" > ~/www/$(whoami).$(hostname)/$(whoami)/rutorrent1/.htaccess;
  20. htpasswd -cb ~/.apache2/rutorrent1'_auth' rutorrent1 password1;
  21. /usr/sbin/apache2ctl -k graceful;
  22. screen -dm -S rutorrent1 rtorrent -n -o import=~/.rutorrent1.rc;
  23. (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) -
  24. mc
  25. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement