mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 00:01:21 +00:00
Removed file that are not used/unusable anymore in newznab-tmux.
This commit is contained in:
@@ -4,7 +4,7 @@ Support is given on irc.synirc.net #tmux channel.
|
||||
I started adapting some of more interesting scripts from nZEDb, but they require tempering with newznab database, so use them at your own risk. Any update to nn+ db could render them useless. Scripts require PHP version > 5.3.10 and Python 2.7x or newer.
|
||||
There is a lib folder in main tmux folder. In that folder you will find two folders, /DB/ and /copy_this/. if you are setting up tmux for the first time, import db.sql using cli (mysql -u {┤your username} -p newznab < db.sql).
|
||||
|
||||
1. Copy files from /lib/copy_this/ folder into your newznab installation /www folder. I have created the nntmux theme where all the settings are available.
|
||||
1. Copy files from /lib/copy_this/ folder into your newznab installation /www folder. I have created the nntmux theme where all the settings are available.
|
||||
|
||||
2. Most of the scripts are now threaded, they need python installed. Install instructions are in threaded_scripts_readme.txt
|
||||
|
||||
@@ -14,16 +14,16 @@ There is a lib folder in main tmux folder. In that folder you will find two fold
|
||||
|
||||
Config and defaults.sh have been deprecated and removed from tmux, as did kevin123 scripts too. Newzdash reporting has also been removed from tmux, as newzdash is no longer maintained.
|
||||
The /lib/DB/patchDB.php script is now used to deal with database changes in tmux.
|
||||
Tmus is started with start.php (php start.php command). Scripts not used anymore are still available for your use, but you need to run them manualy.
|
||||
Tmux is started with start.php (php start.php command). Scripts not used anymore are still available for your use, but you need to run them manualy.
|
||||
|
||||
|
||||
|
||||
Below is the original readme of newznab-tmux, with changes related to my git and removal of donation links:
|
||||
Below is the original readme of newznab-tmux, with changes related to my git
|
||||
|
||||
# Newznab-tmux
|
||||
|
||||
* Screen shots identifying each pane and the process it runs are located at the bottom of this page.
|
||||
|
||||
|
||||
* Before submitting a bug report, please verify that you are running the current revision of Newznab+ and these scripts. Then include as much detail as possible. A screen shot is an extremely telling and very usefull tool.
|
||||
|
||||
* This is a series of scripts that break down the stock processes of a typical Newznab+ installation and perform each task separately and at the same time. Tmux allows for several windows and panes to be created to allow the monitoring of each script as it performs its task. Each task is started and restarted by monitor.php. The post processing has also been enhanced to allow up to 32 simultaneous post processes plus another 8 for each category of releases, for a total of 40 possible post processing at once. The scripts are started by either timers, set in defaults.sh or started automatically and then sleeps for a time set in defaults.sh. Almost everything can be stopped/started from the defaults.sh without restarting the scripts.
|
||||
@@ -37,37 +37,17 @@ Below is the original readme of newznab-tmux, with changes related to my git and
|
||||
* These scripts were written and tested on Ubuntu 12.10 and FreeBSD 9.1. You may need to create a symbolic link or edit these scripts accordingly.
|
||||
|
||||
* Please backup your database first. Something like this should do it.
|
||||
|
||||
|
||||
```bash
|
||||
mysqldump --opt -u username -p newznab > ~/newznab_backup.sql
|
||||
```
|
||||
|
||||
* Now, Clone my github. These scripts need to run from this location and this is where I was asked to put them. If you have decided to use an alternate location, you will need to edit the file bin/config.php to point to the file newznab/www/config.php. If you do not, these scripts will not run.
|
||||
|
||||
```bash
|
||||
cd /var/www/newznab/misc/update_scripts/nix_scripts/
|
||||
git clone https://github.com/DariusIII/newznab-tmux.git tmux
|
||||
cd tmux
|
||||
```
|
||||
|
||||
* If, you have just created your Newznab+ database, you can save yourself some time by importing a sql file, written by \_zoggy\_ and updating your TvRage database. **DO NOT** run this if your database has any releases in it.
|
||||
|
||||
```bash
|
||||
mysql -u username -p newznab < scripts/tvrage-latest.sql
|
||||
```
|
||||
|
||||
* You can also import [kevin123's binaryblacklist](https://github.com/kevinlekiller/Newznab-Blacklist). This will overwrite all blacklists currently in you db.
|
||||
|
||||
```bash
|
||||
mysql -u username -p newznab < scripts/binaryblacklist.sql
|
||||
```
|
||||
|
||||
* Please read the defaults.sh file very carefully. There are a lot of settings and options. Most of the questions asked by new users can be answered by reading this file.
|
||||
|
||||
```bash
|
||||
cp config.sh defaults.sh
|
||||
nano defaults.sh
|
||||
```
|
||||
|
||||
* Now, you need to update your Newznab+ installation, copy some files and edit others. This is destructive and will overwrite any changes you have made to you Newznab+ files. If you do not want to update or overwrite you Newznab+ installation, skip this step, but not the next step.
|
||||
|
||||
@@ -75,37 +55,22 @@ Below is the original readme of newznab-tmux, with changes related to my git and
|
||||
cd scripts && sudo ./update_svn.sh
|
||||
```
|
||||
|
||||
* Or, if you do not want to update your Newznab+ install, you still need to copy and edit files. Before proceeding you must run this or the previous script.
|
||||
|
||||
```bash
|
||||
cd scripts && sudo ./fix_files.sh
|
||||
```
|
||||
|
||||
* These scripts are written and intended that you run them as an unprivileged user.
|
||||
|
||||
```bash
|
||||
cd ../ && ./start.sh
|
||||
```
|
||||
|
||||
* Updating these scripts is very simple.
|
||||
|
||||
```bash
|
||||
git pull
|
||||
sudo scripts/update_svn.sh
|
||||
or
|
||||
sudo scripts/fix_files.sh
|
||||
```
|
||||
|
||||
* If you have grsec compiled into your kernel, you may need root privileges for nmon, bwm-ng and any other app that accesses the /proc folder.
|
||||
|
||||
* Included in the scripts folder is revert.sh. This file will update your Newznab+ installation and overwrite the changes from these scripts.
|
||||
|
||||
* It is recommended, with stock scripts, that when backfilling or importing you set header retention to 0. This is not recommended when you are using these scripts. Let me explain why. If you start with empty parts/binaries tables and you import 100 nzbs, and at the same time you start update_releases, when update_releases finishes its loop, it deletes everything in the parts/binaries tables because you have header retention set to 0. But, heres where the problem is, youcontinued to import 200 nzbs while update_releases was running, they did not get imported as a release, they were deleted at the end of update_releases loop. So, I recommend you set header retention to at least .1, that is 2.4 hours, when only backfilling or importing.
|
||||
|
||||
* Almost any variable in defaults.sh can be changed, except the paths to the commands, and the changes will take effect on the next loop of the Monitor.
|
||||
|
||||
* If you connect using **putty**, then under Window/Translation set Remote character set to UTF-8 and check "Copy and paste line drawing characters". To use 256 colors, you must set Connection/Data Terminal-type string to "xterm-256color" and in Window/Colours check the top three boxes, otherwise only 16 colors are displayed. If you are using FreeBSD, you will need to add export TERM=xterm-256color to your .bashrc file to show 256 colors.
|
||||
|
||||
|
||||
* The powerline status bar has many options that are not enabled by default. To enable any of the additional options, simply uncomment the option in the file powerline/powerline/themes/tmux.sh. If you are using the powerline status bar, you will most likely need a patched font. The Consolas ttf from [powerline-fonts](https://github.com/jonnyboy/powerline-fonts) is the only one that I have found to be nearly complete and work with putty and Win7. The otf fonts should be fine, although I am not able to test. For linux users it may not be necessary to install the patched font. You can follow the instructions of [Fontonfig](https://powerline.readthedocs.org/en/latest/installation/linux.html#font-installation) and that could possibly be an easier path. If you still have problems, you can go the source and read [tmux-powerline](https://github.com/erikw/tmux-powerline) for additional help. For OSX users, it is recommended that you use [iterm2](http://www.iterm2.com/#/section/home).
|
||||
|
||||
* I have included a few scripts for mysql, [mysql-tuning-primer](https://launchpad.net/mysql-tuning-primer), [mysqlreport](http://hackmysql.com/mysqlreport) and [mysqltuner.pl](https://github.com/sunfoxcz/MySQLTuner-perl/blob/master/mysqltuner.pl) to assist in tuning your mysql installation. They are located in the scripts folder.
|
||||
@@ -115,14 +80,14 @@ Below is the original readme of newznab-tmux, with changes related to my git and
|
||||
* A how-to from [nevermind](http://pastebin.com/ibpi71iE) will help your db run a little faster/easier. It can be damaging if you make a mistake while doing this.
|
||||
|
||||
* A couple of autoinstallers are available to completely install everything needed for Ubuntu 12.10 Newznab+ installation. [zombu2](https://github.com/zombu2/nninstall) and [convict](https://github.com/rcconvict/nninstaller) each have simlar installers and can be found in the gits. If you prefor to do things yourself there is an excellent guide [here](http://oizopower.tweakblogs.net/blog/8524/newznab%2B-installatie-%28ubuntu-nginx-percona%29.html).
|
||||
|
||||
|
||||
* Join in the conversation at irc://irc.synirc.net/tmux
|
||||
|
||||
|
||||
|
||||
* Thanks go to all who have offered their assistance and improvement to these scripts, especially kevin123, zombu2, epsol, DejaVu, ajeffco, pcmerc, zDefect, shat, evermind, coolcheat, sy, ll, crunch, ixio, AlienX, Solution-X, cryogenx, convict, wicked, McFuzz, pyr2044, Kragger and \_zoggy\_. If your nick is missing from this this list, PM and I'll fix it quick.
|
||||
|
||||
* These scripts include scripts written by [kevin123's](https://github.com/kevinlekiller), [itandrew's](https://github.com/itandrew/Newznab-InnoDB-Dropin), [tmux-powerline](https://github.com/erikw/tmux-powerline), [thewtex](https://github.com/thewtex/tmux-mem-cpu-load), [cj](https://github.com/NNScripts/nn-custom-scripts) and [\_zoggy\_](http://zoggy.net/tvrage-latest.sql).
|
||||
|
||||
* These scripts include scripts written by [kevin123's](https://github.com/kevinlekiller), [itandrew's](https://github.com/itandrew/Newznab-InnoDB-Dropin), [tmux-powerline](https://github.com/erikw/tmux-powerline), [thewtex](https://github.com/thewtex/tmux-mem-cpu-load), [cj](https://github.com/NNScripts/nn-custom-scripts).
|
||||
|
||||
<hr>
|
||||
If you want to donate please click on donate button
|
||||
@@ -130,10 +95,6 @@ If you want to donate please click on donate button
|
||||
<a style="float:right;" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7MQLC6ZLSQMKE"><img src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" alt="PayPal - The safer, easier way to pay online!" /></a>
|
||||
<a href='http://www.pledgie.com/campaigns/21167'><img alt='Click here to lend your support to: Newznab-tmux continued and make a donation at www.pledgie.com !' src='http://www.pledgie.com/campaigns/21167.png?skin_name=chrome' border='0' /></a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
|
||||
@@ -3,32 +3,32 @@
|
||||
27.08.2013 --> Reverted some changes to namecleaner
|
||||
26.08.2013 --> Fixed typo in monitor.php and updated removeCrapreleases.php.
|
||||
23.08.2013 --> Updated namecleaner
|
||||
19.08.2013 --> Updated namecleaner and namefixer.
|
||||
13.08.2013 --> Added predb dump with more than 5 million releases for prehash table. Run commands from clean_duplicates_predb.txt first and then from import_predb.txt. PreDB data can be downloaded
|
||||
19.08.2013 --> Updated namecleaner and namefixer.
|
||||
13.08.2013 --> Added predb dump with more than 5 million releases for prehash table. Run commands from clean_duplicates_predb.txt first and then from import_predb.txt. PreDB data can be downloaded
|
||||
--> from https://mega.co.nz/#!xggDlBSC!ZDMDPVzbFY_MrzkWqX2EIFgIX8dV0vBkyQ_RF4SAb1A
|
||||
12.08.2013 --> Updates to namecleaning, namefixer and prehash. Reverted behaviour of tmux monitor to old one, fix for postprocessing panes.
|
||||
--> Removed folders and files from hash_matching folder that are not used anymore.
|
||||
12.08.2013 --> Updates to namecleaning, namefixer and prehash. Reverted behaviour of tmux monitor to old one, fix for postprocessing panes.
|
||||
--> Removed folders and files from hash_matching folder that are not used anymore.
|
||||
09.08.2013 --> Updated monitor and namecleaner
|
||||
07.08.2013 --> Updates to namecleaner, changed displayed info in postprocessing panes due to changes to in latest update of nn+
|
||||
|
||||
06.08.2013 --> Updated namecleaner, changed removecrap timer to 2 hours by default and it is run every 40 seconds, added custom updateCategories.php to test folder - updates categories in last 6 hours, not the whole db.
|
||||
06.08.2013 --> Updated namecleaner, changed removecrap timer to 2 hours by default and it is run every 40 seconds, added custom updateCategories.php to test folder - updates categories in last 6 hours, not the whole db.
|
||||
--> Updated tmux packages to 1.8-4 built on 02.08.2013, install using 'sudo dpkg -i tmux_1.8-4.deb'
|
||||
05.08.2013-1 --> Added removeCrapReleases.php to test folder. It needs a modified releases.php that will be copied if you run fix_files.sh. You can run it manualy, type php removeCrapReleases.php to see all the options.
|
||||
05.08.2013-1 --> Added removeCrapReleases.php to test folder. You can run it manualy, type php removeCrapReleases.php to see all the options.
|
||||
--> Script runs in true full mode from tmux. If you don't want that, disable it in your defaults.sh and run it manualy.
|
||||
05.08.2012 --> Updated namecleaner.php, removed aflys init.php and added new create_prehash_table.sql.
|
||||
--> Added prehash sql files to import manualy predb data for prehash table. Do not do it unless you want to mess with prehash table,
|
||||
05.08.2012 --> Updated namecleaner.php, removed aflys init.php and added new create_prehash_table.sql.
|
||||
--> Added prehash sql files to import manualy predb data for prehash table. Do not do it unless you want to mess with prehash table,
|
||||
--> as it needs removal of primary key and removal of id column before you can import those. And you need to add those back later (id and primary key).
|
||||
24.07.2013 --> Added lines to fix_files.sh so the needed files are copied when the script is run. Updated monitor.php to show prehash database status.If no hash matching, name fixing scripts are enabled, this information
|
||||
24.07.2013 --> Updated monitor.php to show prehash database status.If no hash matching, name fixing scripts are enabled, this information
|
||||
--> will not be shown.
|
||||
--> Added another prehash table update.
|
||||
23.07.2013.1 --> Switched to hash_decrypt.php from testing folder, changes to nn+ db and core files are mandatory for new scripts to work.
|
||||
23.07.2013.1 --> Switched to hash_decrypt.php from testing folder, changes to nn+ db and core files are mandatory for new scripts to work.
|
||||
23.07.2013 --> Adapted fixReleaseName script from nZEDb to scan nfo's and releasenames and fix them as much as they can be fixed. Removed pre.corrupt net script (pre.php) as it is useless now.
|
||||
--> Added test folder with "files to copy" folder. In that folder are located core newznab files, but if you want to use fixReleaseNames script you have to copy them to their respective folders.
|
||||
--> Be aware that any future update to nn+ could render these scripts unusable.Use them at your own risk.
|
||||
--> There is a bug in init.php. I will fix it later, as original aflys init.php can be used to create prehash table, after that you can use prehash*.sql to update it.
|
||||
20.07.2013 --> fixed bug in prehash, you will need to run this query: update prehash set title = replace (title, ' - omgwtfnzbs.org', '');
|
||||
19.07.2013 --> Removed nzbx_ws_hashdecrypt.php as it is no longer working.
|
||||
Added standalone hash_decrypt.php as a replacement.
|
||||
Added standalone hash_decrypt.php as a replacement.
|
||||
You need do run this sql "ALTER TABLE `releases` ADD `dehashstatus` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `haspreview`;" on newznab database if you want to run this.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,541 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
#Copy this file to defaults.sh
|
||||
#DO NOT EDIT THIS FILE
|
||||
|
||||
#########################EDIT THESE#########################
|
||||
############################################################
|
||||
|
||||
#This is the shutdown, true/false
|
||||
#on, it runs, off and no scripts will be RESTARTED, when all panes are DEAD, killall tmux
|
||||
#if this is set to false, the script will run 1 loop and terminate
|
||||
export RUNNING="true"
|
||||
|
||||
#these scripts set the 'nice'ness of each script, default is 19, the lowest, the highest is -20
|
||||
#anything between -1 and -20 require root/sudo to run
|
||||
export NICENESS="10"
|
||||
|
||||
#these scripts can add some serious load to your system, without proper monitoring it can be
|
||||
#to much, you can set the max load that any pane will be started at
|
||||
#for example, if you set load to 2, no pane will start when your system load exceeds 2
|
||||
#this does not mean the the desired load will not be exceeded, just that no panes will be be restarted
|
||||
#this one is for all panes except update_releases
|
||||
export MAX_LOAD="2.0"
|
||||
|
||||
#this one is for update_releases
|
||||
export MAX_LOAD_RELEASES="2.0"
|
||||
|
||||
############################################################
|
||||
|
||||
#Set paths
|
||||
export NEWZPATH="/var/www/newznab"
|
||||
|
||||
#Should not need to change
|
||||
export NEWZNAB_PATH=$NEWZPATH"/misc/update_scripts"
|
||||
export TESTING_PATH=$NEWZPATH"/misc/testing"
|
||||
export ADMIN_PATH=$NEWZPATH"/www/admin"
|
||||
|
||||
############################################################
|
||||
|
||||
#Post Processing Additional is the post processing that downloads rar files and attempts to get info for your site
|
||||
#you are able to set the number of processes to be run from 1-32, remember that each process uses 1 of your nntp connections
|
||||
#so, if you have 20, and you set this to 32, you will have errors, lots of errors, nfo lookup uses 1-3 connections each
|
||||
#binaries and backfill threaded default up to 10 connections each and predb uses 1, so understand how many connections you are using when setting
|
||||
#trial and error for this, set to 1 will run > 0, set to 2 will run > 100, 3 will run > 200 and so on.
|
||||
#At some point, increasing this begins to slow things down. It will need to be adjusted for your system
|
||||
#to get the desired performance, 0 will disable all post processing, but not category processing
|
||||
#the first window has up to 16 postprocess and can use primary or alternate NNTP provider
|
||||
export POST_TO_RUN_A="2"
|
||||
|
||||
#The second window also has 16 processes and can use promary or alternate NNTP provider
|
||||
export POST_TO_RUN_B="0"
|
||||
|
||||
#by modifying www/config.php like http://pastebin.com/VgH9DCZw, you can use 1 provider to run update_binaries
|
||||
#and backup and another provider to run post processing with. Or, 1 provider to run up to 16 postprocesses and another to run
|
||||
#up to 16 more postprocesses, or the same provider for everything
|
||||
#you can not switch providers without resetting all groups and truncating, I have included a script in scripts folders to reset and truncate
|
||||
#sudo scripts/reset_truncate.php
|
||||
#it is not necessary to run reset_truncate.php in order to second nntp provider for postprocessing only
|
||||
|
||||
#this one sets 1 provider for everything(false), or first provider for update_binaries and backfill and another for postprocessing(true)
|
||||
#this can not be changed after starting scripts
|
||||
export USE_TWO_NNTP="false"
|
||||
|
||||
#this allows you split the 32 postprocessing into 2 separate providers
|
||||
#this can not be changed after starting scripts
|
||||
export USE_TWO_PP="false"
|
||||
|
||||
############################################################
|
||||
|
||||
#post processing per category, setting the above to 0 does not disable these
|
||||
#this now takes 0 for none, 1 for the first processor or 2 for both processors
|
||||
#run processNfos
|
||||
export NFOS="1"
|
||||
|
||||
#run processGames
|
||||
export GAMES="1"
|
||||
|
||||
#run processMovies
|
||||
export MOVIES="1"
|
||||
|
||||
#run processMusic
|
||||
export MUSIC="1"
|
||||
|
||||
#run processEbook
|
||||
export EBOOK="1"
|
||||
|
||||
#these are true/false
|
||||
#run processTV
|
||||
export TVRAGE="true"
|
||||
|
||||
#run processOther
|
||||
export OTHERS="true"
|
||||
|
||||
#run processUnwanted
|
||||
export UNWANTED="false"
|
||||
|
||||
############################################################
|
||||
|
||||
#Enter the session name to be used by tmux, no spaces allowed in the name, this can be changed after scripts start
|
||||
#if you are running multiple servers, you could put your hostname here
|
||||
export TMUX_SESSION="Newznab"
|
||||
|
||||
#Set, in seconds - how often the monitor.php (left top pane) script should update run the queries against the database
|
||||
#the monitor script will update itself and each pane, once every 5 seconds plus the lagg time time on the loop the db is queried
|
||||
#to press the point, the db is not queried any sooner than the time set below, but the script loops each iteration once every 5 seconds
|
||||
#this makes it more responsive to stop/kill without slamming the db with needless queries, starts are still controlled by the queries
|
||||
export MONITOR_UPDATE="30"
|
||||
|
||||
#you may want to kill the update_binaries, backfill and import if no releases have been add in x minutes, set the timer to anything other than 0 to enable
|
||||
#this will only run every 5 loops of monitor
|
||||
export KILL_UPDATES="0"
|
||||
|
||||
#do you want to just cause it to restart or keep off until a release is created, true for off until a release is created
|
||||
#this will stop all downloads and imports
|
||||
export KEEP_KILLED="false"
|
||||
|
||||
############################################################
|
||||
|
||||
#You can have backfill loop constantly and interject binaries every so often
|
||||
#by setting this next to true, if true, the normal backfill pane will be dead
|
||||
#this works by setting the 2 start timers and which is run at the start of the loop is determined like this
|
||||
#if at the start of the loop, the BINARIES_SEQ_TIMER has expired, then update_binaries will run and the BINARIES_SEQ_TIMER timer is reset
|
||||
#if BINARIES_SEQ_TIMER has not expired, then if BACKFILL_SEQ_TIMER has expired, the backfill will run and BACKFILL_SEQ_TIMER timer is reset
|
||||
export SEQUENTIAL="false"
|
||||
|
||||
#time between loop start for update_binaries, in seconds, this is a countdown timer, not a sleep after it runs
|
||||
#default is 30 minutes
|
||||
#will run on first loop and then not again for at least 1800 seconds
|
||||
export BINARIES_SEQ_TIMER="1800"
|
||||
|
||||
#this will not run on first loop, time between loop start for backfill, in seconds
|
||||
#default is 10 seconds, this will run after time has expired, binaries will take precedence and run before this, if its time has expired
|
||||
export BACKFILL_SEQ_TIMER="10"
|
||||
|
||||
############################################################
|
||||
|
||||
#Choose to run update_binaries true/false
|
||||
export BINARIES="true"
|
||||
|
||||
#Choose to run the threaded or non-threaded newznab binaries scripts true/false
|
||||
#update_binaries.php or update_binaries_threaded.php
|
||||
export BINARIES_THREADS="false"
|
||||
|
||||
#Set, in seconds - how long the update_binaries should sleep between runs
|
||||
#top right pane
|
||||
#sleep timers are not used when using SEQ
|
||||
export BINARIES_SLEEP="40"
|
||||
|
||||
#Set the max amount of unprocessed releases and still allow update_binaries to run
|
||||
#set to 0 to disable
|
||||
export BINARIES_MAX_RELEASES="0"
|
||||
|
||||
#Set the max amount of binaries in the binaries table and still allow update_binaries to run, this is unprocessed binaries, not the total count
|
||||
#only usefull when used with ugo's automake_threaded.php
|
||||
#set to 0 to disable
|
||||
export BINARIES_MAX_BINS="0"
|
||||
|
||||
#Set the max amount of of rows in the parts table and still allow update_binaries to run
|
||||
#set to 0 to disable
|
||||
export BINARIES_MAX_ROWS="0"
|
||||
|
||||
############################################################
|
||||
|
||||
#Choose to run backfill script true/false
|
||||
export BACKFILL="false"
|
||||
|
||||
#Choose to run the threaded or non-threaded newznab backfill scripts true/false
|
||||
#backfill.php or backfill_threaded.php
|
||||
export BACKFILL_THREADS="false"
|
||||
|
||||
#Set, in seconds - how long the backfill should sleep between runs
|
||||
#in pane below update_binaries
|
||||
#sleep timers are not used when using SEQ
|
||||
export BACKFILL_SLEEP="40"
|
||||
|
||||
#Set the max amount of unprocessed releases and still allow backfill to run
|
||||
#set to 0 to disable
|
||||
export BACKFILL_MAX_RELEASES="0"
|
||||
|
||||
#Set the max amount of binaries in the binaries table and still allow backfill to run, this is unprocessed binaries, not the total count
|
||||
#only usefull when used with ugo's automake_threaded.php
|
||||
#set to 0 to disable
|
||||
export BACKFILL_MAX_BINS="0"
|
||||
|
||||
#Set the max amount of of rows in the parts table and still allow backfill to run
|
||||
#set to 0 to disable
|
||||
export BACKFILL_MAX_ROWS="0"
|
||||
|
||||
#Set the maximum days to backfill, you set the Newznab+ admin/edit backfill to 1
|
||||
#this will increment your database by 1 after each backfill loop
|
||||
#once your backfill numbers reach $MAXDAYS, then it will no long increment the database
|
||||
#backfill will continue to run, and do no work, at that point you should disable backfill, below
|
||||
export MAXDAYS="210"
|
||||
|
||||
############################################################
|
||||
|
||||
#use kevin123's safer_backfill_parts.php instead of normal backfill or backfill threaded
|
||||
#this is the script I use, it does 1 group at a time from z to a (wanted to start with tv groups first) 100k parts,
|
||||
#then the script stops (once per loop), if your first_record_postdate on the group is 2012-06-24
|
||||
#it will be skipped (target reached). When that group is done, it will do another ( again from z to a).
|
||||
#this does not use increment, it works by the date set below
|
||||
#you also need to enable kevin's compression mod, those files are needed and you still need to enable BACKFILL
|
||||
export KEVIN_SAFER="false"
|
||||
|
||||
#use kevin123's backfill_parts.php instead of normal backfill
|
||||
export KEVIN_BACKFILL_PARTS="false"
|
||||
|
||||
#use kevin123's backfill_parts_threaded.php instead of normal backfill_threaded
|
||||
export KEVIN_THREADED="false"
|
||||
|
||||
#set the date to go back to, must be in the format of YYYY-MM-DD, like 2012-06-24, this is the date of the posted nzbs
|
||||
export KEVIN_DATE="2012-06-24"
|
||||
|
||||
#set the number of articles/headers to download at one time
|
||||
export KEVIN_PARTS="100000"
|
||||
|
||||
############################################################
|
||||
|
||||
#Set the path to the nzb dump you downloaded from torrents, this is the path to bulk files folder of nzbs
|
||||
#this does not recurse through subfolders, unless you set NZB_THREADS to true
|
||||
#this must be a valid path
|
||||
export NZBS="/path/to/nzbs"
|
||||
|
||||
#Choose to run import nzb script true/false
|
||||
export IMPORT="false"
|
||||
|
||||
#If, you have all of your nzbs in one folder select false
|
||||
#If, you have all of you nzbs split into separate folders, with the root at $NZBS then select true
|
||||
#and 10 nzbs will be imported from each subfolder per loop.
|
||||
#Importing this way, allows all post processing scripts to run, such as book, music, movies
|
||||
#Instead of doing all 1 type at once, spreads the work load
|
||||
export NZB_THREADS="false"
|
||||
|
||||
#How many nzbs to import per loop, if using NZB_THREADS=true the per folder
|
||||
export NZBCOUNT="10"
|
||||
|
||||
#Set, in seconds - how long the nzb-import should sleep between runs
|
||||
#below backfill
|
||||
export IMPORT_SLEEP="40"
|
||||
|
||||
#Set the max amount of unprocessed releases and still allow nzb-import to run
|
||||
#set to 0 to disable
|
||||
export IMPORT_MAX_RELEASES="0"
|
||||
|
||||
#Set the max amount of of rows in the parts table and still allow nzb-import to run
|
||||
#set to 0 to disable
|
||||
export IMPORT_MAX_ROWS="0"
|
||||
|
||||
#import nzbs using the filename as the release name true/false
|
||||
export IMPORT_TRUE="false"
|
||||
|
||||
############################################################
|
||||
|
||||
#MAX_RELEASES for each can be calculated on the total post processing or just the Misc category
|
||||
#to calculate on just the Misc, enable this
|
||||
export MISC_ONLY="false"
|
||||
|
||||
############################################################
|
||||
|
||||
#Create releases, this is really only necessary to turn off when you only want to post process
|
||||
export RELEASES="true"
|
||||
|
||||
#Set, in seconds - how long the update_release should sleep between runs
|
||||
#bottom right
|
||||
export RELEASES_SLEEP="40"
|
||||
|
||||
############################################################
|
||||
|
||||
#Choose to run optimize_innodb.php or optimize_mysiam.php script true/false
|
||||
#set to false by default, you should test the optimize scripts in bin first
|
||||
#optimize_myisam on small tables runs after every 5th loop of update_releases
|
||||
export OPTIMIZE="false"
|
||||
|
||||
#optimize can wait, patiently while all other panes stop and then run
|
||||
#or, forcefully terminate all panes while it runs, to kill all panes and run optimize, enable
|
||||
export OPTIMIZE_KILL="false"
|
||||
|
||||
#How often to run optimize_myisam on small tables seconds, default is 10 min
|
||||
export MYISAM_SMALL="600"
|
||||
|
||||
#How often to run optimize_myisam on large tables seconds, default is 1 hr
|
||||
export MYISAM_LARGE="3600"
|
||||
|
||||
#How often to run optimize_innodb on small tables in seconds, default is 2 hr
|
||||
export INNODB_SMALL="7200"
|
||||
|
||||
#How often to run optimize_innodb on large tables in seconds, default is 48 hrs
|
||||
export INNODB_LARGE="172800"
|
||||
|
||||
############################################################
|
||||
|
||||
#Choose your database engine, comment the one true/false
|
||||
#you should have already converted your database to InnoDB engine, if you select true here
|
||||
export INNODB="false"
|
||||
|
||||
############################################################
|
||||
|
||||
#choose to use cj's fix_android_releases.php
|
||||
export FIX_DROID="false"
|
||||
|
||||
############################################################
|
||||
|
||||
#Choose to run update_predb.php
|
||||
export PREDB="false"
|
||||
|
||||
#How often to update the PreDB in seconds
|
||||
export PREDB_TIMER="900"
|
||||
|
||||
############################################################
|
||||
|
||||
#Choose to run processSpotnab.php
|
||||
export SPOTNAB="false"
|
||||
|
||||
#How often to update the SpotNab in seconds
|
||||
export SPOTNAB_TIMER="900"
|
||||
|
||||
############################################################
|
||||
|
||||
#update the tv schedule and in theaters listings
|
||||
export TV_SCHEDULE="false"
|
||||
|
||||
#How often to update the TV Schedule and the In Theaters in seconds
|
||||
export TVRAGE_TIMER="43200"
|
||||
|
||||
############################################################
|
||||
|
||||
#Choose to run sphinx.php script true/false
|
||||
#set to false by default, you should test the script first, php sphinx.php from the bin folder
|
||||
export SPHINX="false"
|
||||
|
||||
#How often to run sphinx in seconds
|
||||
export SPHINX_TIMER="3600"
|
||||
|
||||
############################################################
|
||||
|
||||
#mediainfo and ffmpeg can hang occasionally, set timer, in seconds, to anything other than 0 to enable
|
||||
#it should not need to run longer that 120 seconds
|
||||
export KILL_PROCESS="0"
|
||||
|
||||
#look at man killall - if you have the -q option, enable this, otherwise leave it disabled
|
||||
export KILL_QUIET="false"
|
||||
|
||||
############################################################
|
||||
|
||||
#Delete parts and binaries older than retention days, which is set in edit - site
|
||||
#this uses a script posted by cj https://github.com/NNScripts/nn-custom-scripts
|
||||
export DELETE_PARTS="false"
|
||||
|
||||
#how often should this be run, default it 1 hr
|
||||
export DELETE_TIMER="3600"
|
||||
|
||||
#Releases may be added/edited with an imdb-id that does not exists in the movieinfo table. This script, update_missing_movie_info,
|
||||
#will fetch all the missing imdb id's from the releases table.
|
||||
export FETCH_MOVIE="false"
|
||||
|
||||
#how often should this be run, default it 12 hr
|
||||
export MOVIE_TIMER="43200"
|
||||
|
||||
############################################################
|
||||
|
||||
#Specify your SED binary, if you are using freebsd or mac, you need to install gnu sed (gsed) and adjust the path
|
||||
export SED="/bin/sed"
|
||||
#export SED="/usr/local/bin/gsed"
|
||||
|
||||
#freebsd, and maybe mac, does not contain SIGSTKFLT, SIGCLD, SIGPOLL, SIGPWR
|
||||
#and powerprocess.php will error on one of those, but appears to work if they
|
||||
#are commented out, enable to have the script comment them out while running update_svn
|
||||
export FIX_POSIX="false"
|
||||
|
||||
############################################################
|
||||
|
||||
#Select some monitoring script, if they are not installed, it will not affect the running of the scripts
|
||||
#these are set to false by default, enable if you want them
|
||||
export USE_HTOP="false"
|
||||
export USE_BWMNG="false"
|
||||
export USE_MYTOP="false"
|
||||
export USE_ATOP="false"
|
||||
export USE_NMON="false"
|
||||
export USE_IOTOP="false"
|
||||
|
||||
#define vnstat user settings to apply at runtime
|
||||
export USE_VNSTAT="false"
|
||||
export VNSTAT_ARGS=""
|
||||
|
||||
#define tcptrack user settings to apply at runtime
|
||||
export USE_TCPTRACK="false"
|
||||
export TRCPTRACK_ARGS="-i eth0 port 443"
|
||||
|
||||
#freebsd does not have iotop, but can run top -m io -o total
|
||||
export USE_TOP="false"
|
||||
|
||||
export USE_IFTOP="false"
|
||||
#select interface to listen, only 1 interface
|
||||
export INTERFACE="eth0"
|
||||
|
||||
#an additional window can be created manually with Ctrl-a c or it can be created at start of script
|
||||
export USE_CONSOLE="false"
|
||||
|
||||
############################################################
|
||||
|
||||
#Use powerline scripts to display the status bar
|
||||
#To display properly, you need a modified font, download and install the font and then select that font in your terminal
|
||||
#This is done on the terminal computer, not the newznab++ server
|
||||
#download fonts from https://github.com/jonnyboy/powerline-fonts
|
||||
#I recommend Consolas if you are using putty in Win7
|
||||
export POWERLINE="false"
|
||||
|
||||
############################################################
|
||||
|
||||
#set your LANG to which ever you like, only effects these scripts
|
||||
export LANG="en_US.UTF-8"
|
||||
|
||||
#to help IMDB return only English titles, enable this, you will need to run update_svn.php or fix_files.sh
|
||||
export EN_IMDB="false"
|
||||
|
||||
############################################################
|
||||
|
||||
#newzdash is a web front end to show statistics of your Newznab+ install
|
||||
#to use, you must first install from https://github.com/AlienXAXS/newzdash
|
||||
|
||||
#this is YOUR shared key and allows these scripts to communicate with newzdash
|
||||
export NEWZDASH_SHARED_SECRET=""
|
||||
|
||||
#the url of your newzdash install, ensure it include HTTP:// or HTTPS:// or it will fail
|
||||
#do not include the trailing /
|
||||
#to disable leave blank ie. export NEWZDASH_URL=""
|
||||
export NEWZDASH_URL=""
|
||||
|
||||
###########################################################
|
||||
|
||||
#Use tmpfs to run post processing on true/false
|
||||
#to keep from running scripts as root, you can create your own ramdisk by adding the next line to /etc/fstab
|
||||
#tmpfs /var/www/newznab/nzbfiles/tmpunrar1 tmpfs user,nodev,nodiratime,nosuid,size=256M,mode=777 0 0
|
||||
#edit the path, the path MUST be the path in site edit with a "1" appended to the end, like above
|
||||
#you still need to set this to true or mount it manually as your user, not as root
|
||||
export RAMDISK="false"
|
||||
|
||||
#for freebsd, it is just a little different, you can either create the ramdisk and mount it by adding the next line to /etc/fstab
|
||||
#tmpfs /var/www/newznab/nzbfiles/tmpunrar1 tmpfs rw,size=256M,mode=777 0 0
|
||||
#or, give users the permission to mount it by running sudo sysctl vfs.usermount=1 and then add the next line to /etc/fstab
|
||||
#tmpfs /var/www/newznab/nzbfiles/tmpunrar1 tmpfs rw,noauto,size=256M,mode=777 0 0
|
||||
|
||||
############################################################
|
||||
|
||||
#set svn password, for use with scripts/update_svn.sh
|
||||
#update_svn.sh is destructive, it update your version to match the svn version
|
||||
export SVN_PASSWORD="password"
|
||||
|
||||
#running update_svn as root will change file ownership of every file in the svn path
|
||||
#to chown -R the path, enable and set user/group
|
||||
#newznab/nzbfiles is not chown'd
|
||||
export CHOWN_TRUE="false"
|
||||
|
||||
#set CHOWN_TRUE="true" and WWW_USER="{youruser}:www-data" and run update_svn.sh or fix_files.sh
|
||||
#and you will will not need root to run these scripts
|
||||
export WWW_USER="www-data:www-data"
|
||||
|
||||
###########################################################
|
||||
|
||||
#if you have a ramdisk and would like to monitor it's use, set path here
|
||||
#this is not the same as RAMDISK above, I keep my parts table on a ramdisk
|
||||
export RAMDISK_PATH=""
|
||||
|
||||
###########################################################
|
||||
|
||||
#logs can be written, per pane, to the logs folder
|
||||
export WRITE_LOGS="false"
|
||||
|
||||
###########################################################
|
||||
|
||||
#user defined scripts, you can define 3 scripts to run at specific times
|
||||
#you must have them in the user_scripts, no other location
|
||||
#This one will run before tmux creates the ui, so if you want to run something before the scripts add here
|
||||
#it is assumed that the script is a bash script and has been chmod +x
|
||||
export USER_DEF_ONE=""
|
||||
|
||||
#this one will run before MyIsam Large
|
||||
export USER_DEF_TWO=""
|
||||
|
||||
#this one will run after MyIsam Large, not same process as below
|
||||
export USER_DEF_THREE=""
|
||||
|
||||
#this one will run before InnoDB Large and MyIsam Large runs in same process, so before MyIsam Large, not same process as above
|
||||
export USER_DEF_FOUR=""
|
||||
|
||||
#this one will run after InnoDB Large
|
||||
export USER_DEF_FIVE=""
|
||||
|
||||
###########################################################
|
||||
|
||||
#By using this script you understand that the programmer is not responsible for any loss of data, users, or sanity.
|
||||
#You also agree that you were smart enough to make a backup of your database and files. Do you agree? yes/no
|
||||
export AGREED="yes"
|
||||
|
||||
############################################################
|
||||
|
||||
##END OF EDITS##
|
||||
|
||||
command -v mysql >/dev/null 2>&1 || { echo >&2 "I require mysql but it's not installed. Aborting."; exit 1; } && export MYSQL=`command -v mysql`
|
||||
command -v php5 >/dev/null 2>&1 && export PHP=`command -v php5` || { export PHP=`command -v php`; }
|
||||
command -v tmux >/dev/null 2>&1 || { echo >&2 "I require tmux but it's not installed. Aborting."; exit 1; } && export TMUXCMD=`command -v tmux`
|
||||
command -v nice >/dev/null 2>&1 || { echo >&2 "I require nice but it's not installed. Aborting."; exit 1; } && export NICE=`command -v nice`
|
||||
command -v tee >/dev/null 2>&1 || { echo >&2 "I require tee but it's not installed. Aborting."; exit 1; } && export TEE=`command -v tee`
|
||||
command -v mysqladmin >/dev/null 2>&1 || { echo >&2 "I require mysqladmin but it's not installed. Aborting."; exit 1; } && export MYSQLADMIN=`command -v mysqladmin`
|
||||
|
||||
if [[ $USE_HTOP == "true" ]]; then
|
||||
command -v htop >/dev/null 2>&1|| { echo >&2 "I require htop but it's not installed. Aborting."; exit 1; } && export HTOP=`command -v htop`
|
||||
fi
|
||||
if [[ $USE_NMON == "true" ]]; then
|
||||
command -v nmon >/dev/null 2>&1 || { echo >&2 "I require nmon but it's not installed. Aborting."; exit 1; } && export NMON=`command -v nmon`
|
||||
fi
|
||||
if [[ $USE_BWMNG == "true" ]]; then
|
||||
command -v bwm-ng >/dev/null 2>&1|| { echo >&2 "I require bwm-ng but it's not installed. Aborting."; exit 1; } && export BWMNG=`command -v bwm-ng`
|
||||
fi
|
||||
if [[ $USE_IOTOP == "true" ]]; then
|
||||
command -v iotop >/dev/null 2>&1|| { echo >&2 "I require iotop but it's not installed. Aborting."; exit 1; } && export IOTOP=`command -v iotop`
|
||||
fi
|
||||
if [[ $USE_TOP == "true" ]]; then
|
||||
command -v top >/dev/null 2>&1|| { echo >&2 "I require top but it's not installed. Aborting."; exit 1; } && export TOP=`command -v top`
|
||||
fi
|
||||
if [[ $USE_MYTOP == "true" ]]; then
|
||||
command -v mytop >/dev/null 2>&1|| { echo >&2 "I require mytop but it's not installed. Aborting."; exit 1; } && export MYTOP=`command -v mytop`
|
||||
fi
|
||||
if [[ $USE_VNSTAT == "true" ]]; then
|
||||
command -v vnstat >/dev/null 2>&1|| { echo >&2 "I require vnstat but it's not installed. Aborting."; exit 1; } && export VNSTAT=`command -v vnstat`
|
||||
fi
|
||||
if [[ $USE_IFTOP == "true" ]]; then
|
||||
command -v iftop >/dev/null 2>&1|| { echo >&2 "I require iftop but it's not installed. Aborting."; exit 1; } && export IFTOP=`command -v iftop`
|
||||
fi
|
||||
if [[ $USE_ATOP == "true" ]]; then
|
||||
command -v atop >/dev/null 2>&1|| { echo >&2 "I require atop but it's not installed. Aborting."; exit 1; } && export ATOP=`command -v atop`
|
||||
fi
|
||||
if [[ $USE_TCPTRACK == "true" ]]; then
|
||||
command -v tcptrack >/dev/null 2>&1|| { echo >&2 "I require tcptrack but it's not installed. Aborting."; exit 1; } && export TCPTRACK=`command -v tcptrack`
|
||||
fi
|
||||
if [[ $POWERLINE == "true" ]]; then
|
||||
export TMUX_CONF="powerline/tmux.conf"
|
||||
else
|
||||
export TMUX_CONF="conf/tmux.conf"
|
||||
fi
|
||||
@@ -1,129 +0,0 @@
|
||||
#
|
||||
# The MySQL database server configuration file.
|
||||
#
|
||||
# You can copy this to one of:
|
||||
# - "/etc/mysql/my.cnf" to set global options,
|
||||
# - "~/.my.cnf" to set user-specific options.
|
||||
#
|
||||
# One can use all long options that the program supports.
|
||||
# Run program with --help to get a list of available options and with
|
||||
# --print-defaults to see which it would actually understand and use.
|
||||
#
|
||||
# For explanations see
|
||||
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
|
||||
|
||||
# This will be passed to all mysql clients
|
||||
# It has been reported that passwords should be enclosed with ticks/quotes
|
||||
# escpecially if they contain "#" chars...
|
||||
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
|
||||
[client]
|
||||
port = 3306
|
||||
socket = /var/run/mysqld/mysqld.sock
|
||||
|
||||
# Here is entries for some specific programs
|
||||
# The following values assume you have at least 32M ram
|
||||
|
||||
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
|
||||
[mysqld_safe]
|
||||
socket = /var/run/mysqld/mysqld.sock
|
||||
nice = 0
|
||||
|
||||
[mysqld]
|
||||
#
|
||||
# * Basic Settings
|
||||
#
|
||||
user = mysql
|
||||
pid-file = /var/run/mysqld/mysqld.pid
|
||||
socket = /var/run/mysqld/mysqld.sock
|
||||
port = 3306
|
||||
basedir = /usr
|
||||
datadir = /var/lib/mysql
|
||||
tmpdir = /tmp
|
||||
lc-messages-dir = /usr/share/mysql
|
||||
skip-external-locking
|
||||
#
|
||||
# Instead of skip-networking the default is now to listen only on
|
||||
# localhost which is more compatible and is not less secure.
|
||||
bind-address = 127.0.0.1
|
||||
#
|
||||
# * Fine Tuning
|
||||
#
|
||||
key_buffer = 16M
|
||||
max_allowed_packet = 16M
|
||||
thread_stack = 192K
|
||||
thread_cache_size = 8
|
||||
# This replaces the startup script and checks MyISAM tables if needed
|
||||
# the first time they are touched
|
||||
myisam-recover = BACKUP
|
||||
#max_connections = 100
|
||||
#table_cache = 64
|
||||
#thread_concurrency = 10
|
||||
group_concat_max_len = 8192
|
||||
|
||||
#
|
||||
# * Query Cache Configuration
|
||||
#
|
||||
query_cache_limit = 1M
|
||||
query_cache_size = 16M
|
||||
#
|
||||
# * Logging and Replication
|
||||
#
|
||||
# Both location gets rotated by the cronjob.
|
||||
# Be aware that this log type is a performance killer.
|
||||
# As of 5.1 you can enable the log at runtime!
|
||||
#general_log_file = /var/log/mysql/mysql.log
|
||||
#general_log = 1
|
||||
#
|
||||
# Error log - should be very few entries.
|
||||
#
|
||||
log_error = /var/log/mysql/error.log
|
||||
#
|
||||
# Here you can see queries with especially long duration
|
||||
#log_slow_queries = /var/log/mysql/mysql-slow.log
|
||||
#long_query_time = 2
|
||||
#log-queries-not-using-indexes
|
||||
#
|
||||
# The following can be used as easy to replay backup logs or for replication.
|
||||
# note: if you are setting up a replication slave, see README.Debian about
|
||||
# other settings you may need to change.
|
||||
#server-id = 1
|
||||
#log_bin = /var/log/mysql/mysql-bin.log
|
||||
expire_logs_days = 10
|
||||
max_binlog_size = 100M
|
||||
#binlog_do_db = include_database_name
|
||||
#binlog_ignore_db = include_database_name
|
||||
#
|
||||
# * InnoDB
|
||||
#
|
||||
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
|
||||
# Read the manual for more InnoDB related options. There are many!
|
||||
#
|
||||
# * Security Features
|
||||
#
|
||||
# Read the manual, too, if you want chroot!
|
||||
# chroot = /var/lib/mysql/
|
||||
#
|
||||
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
|
||||
#
|
||||
# ssl-ca=/etc/mysql/cacert.pem
|
||||
# ssl-cert=/etc/mysql/server-cert.pem
|
||||
# ssl-key=/etc/mysql/server-key.pem
|
||||
|
||||
|
||||
|
||||
[mysqldump]
|
||||
quick
|
||||
quote-names
|
||||
max_allowed_packet = 16M
|
||||
|
||||
[mysql]
|
||||
#no-auto-rehash # faster start of mysql but no tab completition
|
||||
|
||||
[isamchk]
|
||||
key_buffer = 16M
|
||||
|
||||
#
|
||||
# * IMPORTANT: Additional settings that can override those from this file!
|
||||
# The files must end with '.cnf', otherwise they'll be ignored.
|
||||
#
|
||||
!includedir /etc/mysql/conf.d/
|
||||
@@ -1,33 +0,0 @@
|
||||
DROP TABLE IF EXISTS `binaryblacklist`;
|
||||
CREATE TABLE IF NOT EXISTS `binaryblacklist` (
|
||||
`ID` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`groupname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`regex` varchar(2000) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`msgcol` int(11) unsigned NOT NULL DEFAULT '1',
|
||||
`optype` int(11) unsigned NOT NULL DEFAULT '1',
|
||||
`status` int(11) unsigned NOT NULL DEFAULT '1',
|
||||
`description` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1000100;
|
||||
|
||||
--
|
||||
-- Dumping data for table `binaryblacklist`
|
||||
--
|
||||
|
||||
INSERT INTO `binaryblacklist` (`ID`, `groupname`, `regex`, `msgcol`, `optype`, `status`, `description`) VALUES
|
||||
(100001, 'alt.binaries.*', '(brazilian|chinese|croatian|danish|deutsch|dutch|estonian|flemish|finnish|french|german|greek|hebrew|icelandic|italian|latin|nordic|norwegian|polish|portuguese|japenese|japanese|russian|serbian|slovenian|spanish|spanisch|swedish|thai|turkish)[\\)]?( \\-)?[ \\-\\.]((19|20)\\d\\d|(480|720|1080)(i|p)|3d|5\\.1|dts|ac3|truehd|(bd|dvd|hd|sat|vhs|web)\\.?rip|(bd.)?(h|x).?2?64|divx|xvid|bluray|svcd|board|custom|"|(d|h|p|s)d?v?tv|m?dvd(-|sc)?r|int(ernal)?|nzb|par2|\\b(((dc|ld|md|ml|dl|hr|se)[.])|(anime\\.)|(fs|ws)|dsr|pal|ntsc|iso|complete|cracked|ebook|extended|dirfix|festival|proper|game|limited|read.?nfo|real|rerip|repack|remastered|retail|samplefix|scan|screener|theatrical|uncut|unrated|incl|winall)\\b|doku|doc|dub|sub|\\(uncut\\))', 1, 1, 0, 'Blacklists non-english releases.'),
|
||||
(100002, 'alt.binaries.*', '[ -.](bl|cz|de|es|fr|ger|heb|hu|hun|ita|ko|kor|nl|pl|se)[ -.]((19|20)\\d\\d|(480|720|1080)(i|p)|(bd|dvd.?|sat|vhs)?rip?|(bd|dl)mux|( -.)?(dub|sub)(ed|bed)?|complete|convert|(d|h|p|s)d?tv|dirfix|docu|dual|dvbs|dvdscr|eng|(h|x).?2?64|int(ernal)?|pal|proper|repack|xbox)', 1, 1, 0, 'Blacklists non-english abbreviated releases.'),
|
||||
(100003, 'alt.binaries.*', '[ -.]((19|20)\\d\\d|(bd|dvd.?|sat|vhs)?rip?|custom|divx|dts)[ -.](bl|cz|de|es|fr|ger|heb|hu|ita|ko|kor|nl|pl|se)[ -.]', 1, 1, 0, 'Blacklists non-english abbreviated (reversed) releases.'),
|
||||
(100004, 'alt.binaries.*', '[ -.](chinese.subbed|dksubs|fansubs?|finsub|hebdub|hebsub|korsub|norsub|nordicsubs|nl( -.)?sub(ed|bed|s)?|nlvlaams|pldub|plsub|slosinh|swesub|truefrench|vost(fr)?)[ -.]', 1, 1, 0, 'Blacklists non-english subtitled releases.'),
|
||||
(100005, 'alt.binaries.*', '[ -._](4u\\.nl|nov[ a]+rip|realco|videomann|vost)[ -._]', 1, 1, 0, 'Blacklists non-english (release group specific) releases.'),
|
||||
(100006, 'alt.binaries.*', '[ -.]((bd|dl)mux|doku|\\[foreign\\]|seizoen|staffel)[ -.]', 1, 1, 0, 'Blacklists non-english (lang specific) releases.'),
|
||||
(100020, 'alt.binaries.*', '[ -.](imageset|pictureset|xxx)[ -.]', 1, 1, 0, 'Blacklists porn releases.'),
|
||||
(100025, 'alt.binaries.*', 'hdnectar|nzbcave', 1, 1, 0, 'Bad releases.'),
|
||||
(100030, 'alt.binaries.*', '[ -](de|es|fr|it|ko|nl|pl|se)[ -]((audiobook|cuefix|bonus|bootleg|dirfix|nfofix|dvb|promo|readnfo|real|rerip|repack|proper)[ -])?\\d?(bluray|hddvd|dvd|ddc|cd(s|rs|rep)?|mcd|(\\d_)?(vls|m?lp|ep|vinyl))', 1, 1, 0, 'Blacklists music, music video etc releases.'),
|
||||
(100040, 'alt.binaries.*', '[ -.](espn|ultimate.?fighter|mlb|mls|mfc|mma|ncaa|nba|nbl|nfl|nhl|pga|tna|ufc|us.?open|wec|wcw|world.?series|wwe|wwf)[ -.].*((480|720|1080)(i|p)|(d|h|p|s)d?tv|divx|(dvd.?|sat|vhs)rip|(h|x).?264|vcd|xvi ?d)', 1, 1, 0, 'Blacklists american and canadian sports releases.'),
|
||||
(100041, 'alt.binaries.*', '[ -.](anz|bundesliga|cfb|epl|fa.?cup|la.?liga|netball|nrl|rugby|serie.?a|supercup|super.?league|uefa|wimbledon)[ -.].*((480|720|1080)(i|p)|(d|h|p|s)d?tv|divx|(dvd.?|sat|vhs)rip|(h|x).?264|xvid)', 1, 1, 0, 'Blacklists european sports releases.'),
|
||||
(100042, 'alt.binaries.*', '[ -.](afl|fifa|fina|gymanstics|hdnet.?fights|iihf|league(.?challenge|.?cup|.?soccer)|olympics?|playoffs|wba|world.?championships?|world cup)[ -.].*((480|720|1080)(i|p)|(d|h|p|s)d?tv|divx|(dvd.?|sat|vhs)rip|(h|x).?264|xvid)', 1, 1, 0, 'Blacklists other sports releases.'),
|
||||
(100043, 'alt.binaries.*', '[ -.](bmx|motogp|sbk|superbike|tour.?de.?france|la.?vuelta|wsbk).*[ -.]((480|720|1080)(i|p)|(bi|motor)?cycle?(ing)?|(d|h|p|s)d?tv|divx|(dvd.?|sat|vhs)rip|(h|x).?264|rac(e|ing)|round|series|xvid)', 1, 1, 0, 'Blacklists bike racing releases.'),
|
||||
(100044, 'alt.binaries.*', '[ -.](ama.?supercross|dtm|f1.?legends|fia|formula(.?one|.?1|.?honda|.?renault)|gp3|grand.?prix|indycar|nascar|rally(.?challenge|.?championship)|supercars?|wrc|wtcc).*[ -.]((480|720|1080)(i|p)|(d|h|p|s)d?tv|divx|(dvd.?|sat|vhs)rip|(h|x).?264|rac(e|ing)|round|series|xvid)', 1, 1, 0, 'Blacklists car racing releases.'),
|
||||
(100045, 'alt.binaries.*', '[ -.](horse.?racing|kentucky.?derby).*[ -.]((480|720|1080)(i|p)|(d|h|p|s)d?tv|divx|(dvd.?|sat|vhs)rip|(h|x).?264|rac(e|ing)|xvid)', 1, 1, 0, 'Blacklists other racing releases.');
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
<?php
|
||||
require(dirname(__FILE__)."/../bin/config.php");
|
||||
require(WWW_DIR."/lib/framework/cache.php");
|
||||
require_once(WWW_DIR."/lib/framework/db.php");
|
||||
|
||||
$sql = "SHOW tables";
|
||||
$db = new DB();
|
||||
|
||||
$tables = $db->query($sql);
|
||||
foreach($tables as $row)
|
||||
{
|
||||
$tbl = $row['Tables_in_newznab'];
|
||||
printf("Converting $tbl\n");
|
||||
$sql = "ALTER TABLE $tbl ENGINE=INNODB ROW_FORMAT=DYNAMIC";
|
||||
$db->query($sql);
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,110 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
DIR="$( dirname "$SOURCE" )"
|
||||
while [ -h "$SOURCE" ]
|
||||
do
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
||||
# Make sure only root can run our script
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source $DIR/../defaults.sh
|
||||
|
||||
#edit this to allow script to run, be sure of the paths
|
||||
#the ramdisk needs to be twice the size of the parts table max size, it needs room to copy itself during optimise
|
||||
#i take no responsibility if this fails and you lose you db
|
||||
#remove the next 2 lines when you have edited this file properlly
|
||||
echo "Please edit this script, very carefully!"
|
||||
exit
|
||||
|
||||
export USER="your username"
|
||||
export PATH_RAMDISK="/var/ramdisk"
|
||||
export MYSQL_PATH="/var/lib/mysql/newznab"
|
||||
export SQL_BACKUP="/home/$USER/sql_backup"
|
||||
|
||||
#get userid for mysql
|
||||
USERID=`id -u mysql`
|
||||
GROUPID=`id -g mysql`
|
||||
|
||||
/etc/init.d/mysql stop
|
||||
|
||||
if ! grep -q '#RAMDISK' "/etc/fstab" ; then
|
||||
echo "" | sudo tee -a /etc/fstab
|
||||
echo "#RAMDISK" | sudo tee -a /etc/fstab
|
||||
echo "tmpfs $PATH_RAMDISK tmpfs rw,uid=$USERID,gid=$GROUPID,nodiratime,size=5G,nr_inodes=10k,mode=0700 0 0" | sudo tee -a /etc/fstab
|
||||
fi
|
||||
|
||||
mkdir -p $PATH_RAMDISK
|
||||
|
||||
#determine if ramdisk is in fstab
|
||||
if [[ ! `mount | grep "$PATH_RAMDISK"` ]]; then
|
||||
mount "$PATH_RAMDISK"
|
||||
fi
|
||||
|
||||
if [ ! -d "$SQL_BACKUP" ]; then
|
||||
mkdir $SQL_BACKUP
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -h "$MYSQL_PATH/parts.frm" ] && [ -f $MYSQL_PATH/parts.frm ]; then
|
||||
cp $MYSQL_PATH/parts.frm $SQL_BACKUP/
|
||||
mv $MYSQL_PATH/parts.frm $PATH_RAMDISK/
|
||||
ln -s $PATH_RAMDISK/parts.frm $MYSQL_PATH/
|
||||
fi
|
||||
if [ ! -h "$MYSQL_PATH/parts.MYD" ] && [ -f $MYSQL_PATH/parts.MYD ]; then
|
||||
cp $MYSQL_PATH/parts.MYD $SQL_BACKUP/
|
||||
mv $MYSQL_PATH/parts.MYD $PATH_RAMDISK/
|
||||
ln -s $PATH_RAMDISK/parts.MYD $MYSQL_PATH/
|
||||
fi
|
||||
if [ ! -h "$MYSQL_PATH/parts.MYI" ] && [ -f $MYSQL_PATH/parts.MYI ]; then
|
||||
cp $MYSQL_PATH/parts.MYI $SQL_BACKUP/
|
||||
mv $MYSQL_PATH/parts.MYI $PATH_RAMDISK/
|
||||
ln -s $PATH_RAMDISK/parts.MYI $MYSQL_PATH/
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -h "$MYSQL_PATH/partrepair.frm" ] && [ -f $MYSQL_PATH/partrepair.frm ]; then
|
||||
cp $MYSQL_PATH/partrepair.frm $SQL_BACKUP/
|
||||
mv $MYSQL_PATH/partrepair.frm $PATH_RAMDISK/
|
||||
ln -s $PATH_RAMDISK/partrepair.frm $MYSQL_PATH/
|
||||
fi
|
||||
if [ ! -h "$MYSQL_PATH/partrepair.MYD" ] && [ -f $MYSQL_PATH/partrepair.MYD ]; then
|
||||
cp $MYSQL_PATH/partrepair.MYD $SQL_BACKUP/
|
||||
mv $MYSQL_PATH/partrepair.MYD $PATH_RAMDISK/
|
||||
ln -s $PATH_RAMDISK/partrepair.MYD $MYSQL_PATH/
|
||||
fi
|
||||
if [ ! -h "$MYSQL_PATH/partrepair.MYI" ] && [ -f $MYSQL_PATH/partrepair.MYI ]; then
|
||||
cp $MYSQL_PATH/partrepair.MYI $SQL_BACKUP/
|
||||
mv $MYSQL_PATH/partrepair.MYI $PATH_RAMDISK/
|
||||
ln -s $PATH_RAMDISK/partrepair.MYI $MYSQL_PATH/
|
||||
fi
|
||||
|
||||
if [ ! -h "$MYSQL_PATH/binaries.frm" ] && [ -f $MYSQL_PATH/binaries.frm ]; then
|
||||
cp $MYSQL_PATH/binaries.frm $SQL_BACKUP/
|
||||
mv $MYSQL_PATH/binaries.frm $PATH_RAMDISK/
|
||||
ln -s $PATH_RAMDISK/binaries.frm $MYSQL_PATH/
|
||||
fi
|
||||
if [ ! -h "$MYSQL_PATH/binaries.MYD" ] && [ -f $MYSQL_PATH/binaries.MYD ]; then
|
||||
cp $MYSQL_PATH/binaries.MYD $SQL_BACKUP/
|
||||
mv $MYSQL_PATH/binaries.MYD $PATH_RAMDISK/
|
||||
ln -s $PATH_RAMDISK/binaries.MYD $MYSQL_PATH/
|
||||
fi
|
||||
if [ ! -h "$MYSQL_PATH/binaries.MYI" ] && [ -f $MYSQL_PATH/binaries.MYI ]; then
|
||||
cp $MYSQL_PATH/binaries.MYI $SQL_BACKUP/
|
||||
mv $MYSQL_PATH/binaries.MYI $PATH_RAMDISK/
|
||||
ln -s $PATH_RAMDISK/binaries.MYI $MYSQL_PATH/
|
||||
fi
|
||||
|
||||
chown -R $USER:$USER $SQL_BACKUP/
|
||||
chown -R mysql:mysql $PATH_RAMDISK
|
||||
chown -R mysql:mysql $MYSQL_PATH
|
||||
|
||||
/etc/init.d/mysql start
|
||||
exit
|
||||
@@ -1,76 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
DIR="$( dirname "$SOURCE" )"
|
||||
while [ -h "$SOURCE" ]
|
||||
do
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
||||
# Make sure only root can run our script
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source $DIR/../defaults.sh
|
||||
|
||||
#purge smarty cache
|
||||
cd $NEWZPATH"/www/lib/smarty/templates_c/"
|
||||
rm -fv *
|
||||
|
||||
#edit powerprocess.php
|
||||
if [[ $FIX_POSIX == "true" ]]; then
|
||||
echo "editing powerprocess"
|
||||
$SED -i -e 's/case SIGSTKFLT:/\/\/case SIGSTKFLT:/' $NEWZPATH/www/lib/powerprocess.php
|
||||
$SED -i -e 's/return 'SIGSTKFLT';/\/\/return 'SIGSTKFLT';/' $NEWZPATH/www/lib/powerprocess.php
|
||||
$SED -i -e 's/case SIGCLD:/\/\/case SIGCLD:/' $NEWZPATH/www/lib/powerprocess.php
|
||||
$SED -i -e 's/return 'SIGCLD';/\/\/return 'SIGCLD';/' $NEWZPATH/www/lib/powerprocess.php
|
||||
$SED -i -e 's/case SIGPOLL:/\/\/case SIGPOLL:/' $NEWZPATH/www/lib/powerprocess.php
|
||||
$SED -i -e 's/return 'SIGPOLL';/\/\/return 'SIGPOLL';/' $NEWZPATH/www/lib/powerprocess.php
|
||||
$SED -i -e 's/case SIGPWR:/\/\/case SIGPWR:/' $NEWZPATH/www/lib/powerprocess.php
|
||||
$SED -i -e 's/return 'SIGPWR';/\/\/return 'SIGPWR';/' $NEWZPATH/www/lib/powerprocess.php
|
||||
fi
|
||||
|
||||
|
||||
#import kevin123's compression mod
|
||||
if [[ $KEVIN_SAFER == "true" ]] || [[ $PARSING_MOD == "true" ]]; then
|
||||
cd $DIR"/kevin123"
|
||||
cp -frv * $NEWZPATH/www/lib/
|
||||
fi
|
||||
|
||||
#set user/group to www
|
||||
echo "Fixing permisions, this can take some time if you have a large set of releases"
|
||||
if [[ $CHOWN_TRUE == "true" ]]; then
|
||||
chown $WWW_USER $NEWZPATH/*
|
||||
chown -R $WWW_USER $NEWZPATH/www/
|
||||
chown -R $WWW_USER $NEWZPATH/db/
|
||||
chown -R $WWW_USER $NEWZPATH/misc/
|
||||
chown -R $WWW_USER $NEWZPATH/nzbfiles/
|
||||
chmod 775 $NEWZPATH/www/lib/smarty/templates_c
|
||||
chmod -R 775 $NEWZPATH/www/covers
|
||||
chmod 775 $NEWZPATH/www
|
||||
chmod -R 775 $NEWZPATH/nzbfiles
|
||||
#chmod 775 $NEWZPATH/www/install
|
||||
else
|
||||
chmod 777 $NEWZPATH/www/lib/smarty/templates_c
|
||||
chmod -R 777 $NEWZPATH/www/covers
|
||||
chmod 777 $NEWZPATH/www
|
||||
chmod -R 777 $NEWZPATH/nzbfiles/
|
||||
#chmod 777 $NEWZPATH/www/install
|
||||
fi
|
||||
|
||||
echo -e "\033[38;5;160mCompleted\033[39m"
|
||||
|
||||
echo -e "\033[1;33m\n\nIf the nmon, bwg-nm windows close when you select networking, then you will need to use sudo or su."
|
||||
echo -e "or add them to sudo for your user.\n"
|
||||
echo -e "Tmux is very easy to use. To detach from the current session, use Ctrl-a d. You can select"
|
||||
echo -e "simply by clicking in it and you can resize by dragging the borders.\n"
|
||||
echo -e "To reattach to a running session, tmux att."
|
||||
echo -e "To navigate between panes, Ctrl-a q then the number of the pane."
|
||||
echo -e "To navigate between windows, Ctrl-a then the number of the window."
|
||||
echo -e "To create a new window, Ctrl-a c \n\n\033[0m"
|
||||
exit
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#this file can be used to save a put a time editing and reediting your defaults.sh
|
||||
#this file must be renamed to fix.sh, or else it will be overwritten with the next git pull
|
||||
#then edit, add, remove anything see necessary
|
||||
|
||||
#useage before updating the git repo run:
|
||||
#./fix.sh
|
||||
#git pull
|
||||
#fix.sh
|
||||
|
||||
#now you have edited the file to update, updated and put you changes back.
|
||||
|
||||
if grep -q '/path/to/nzbs' "../defaults.sh" ; then
|
||||
sed -i -e 's/export NZBS=.*$/\export NZBS="\/home\/jonnyboy\/nzbs\/batch"/' ../defaults.sh
|
||||
sed -i -e 's/export OPTIMISE=.*$/export OPTIMISE="true"/' ../defaults.sh
|
||||
sed -i -e 's/export AGREED=.*$/export AGREED="yes"/' ../defaults.sh
|
||||
sed -i -e 's/export INNODB=.*$/export INNODB="false"/' ../defaults.sh
|
||||
sed -i -e 's/SLEEP=.*$/SLEEP="1"/' ../defaults.sh
|
||||
sed -i -e 's/export SHOW_WHY=.*$/export SHOW_WHY="false"/' ../defaults.sh
|
||||
sed -i -e 's/export PARSING=.*$/export PARSING="true"/' ../defaults.sh
|
||||
sed -i -e 's/export PASSWORD=.*$/export PASSWORD="password"/' update_svn.sh
|
||||
sed -i -e 's/RELEASES_SLEEP=.*$/RELEASES_SLEEP="20"/' ../defaults.sh
|
||||
else
|
||||
rm ../defaults.sh
|
||||
sed -i -e 's/export PASSWORD=.*$/export PASSWORD="password"/' update_svn.sh
|
||||
fi
|
||||
@@ -1,82 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
DIR="$( dirname "$SOURCE" )"
|
||||
while [ -h "$SOURCE" ]
|
||||
do
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
||||
# Make sure only root can run our script
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source $DIR/../defaults.sh
|
||||
|
||||
#edit this to allow script to run, be sure of the paths
|
||||
#the ramdisk needs to be twice the size of the parts table max size, it needs room to copy itself during optimise
|
||||
#i take no responsibility if this fails and you lose you db
|
||||
#remove the next 2 lines when you have edited this file properlly
|
||||
echo "Please edit this script, very carefully!"
|
||||
exit
|
||||
|
||||
export PATH_RAMDISK="/var/ramdisk"
|
||||
export MYSQL_PATH="/var/lib/mysql/newznab"
|
||||
export SQL_BACKUP="/home/$USER/sql_backup"
|
||||
|
||||
/etc/init.d/mysql stop
|
||||
|
||||
if [ -h "$MYSQL_PATH/parts.frm" ] && [ -f $PATH_RAMDISK/parts.frm ]; then
|
||||
rm $MYSQL_PATH/parts.frm
|
||||
mv $PATH_RAMDISK/parts.frm $MYSQL_PATH/
|
||||
fi
|
||||
if [ -h "$MYSQL_PATH/parts.MYD" ] && [ -f $PATH_RAMDISK/parts.MYD ]; then
|
||||
rm $MYSQL_PATH/parts.MYD
|
||||
mv $PATH_RAMDISK/parts.MYD $MYSQL_PATH/
|
||||
fi
|
||||
if [ -h "$MYSQL_PATH/parts.MYI" ] && [ -f $PATH_RAMDISK/parts.MYI ]; then
|
||||
rm $MYSQL_PATH/parts.MYI
|
||||
mv $PATH_RAMDISK/parts.MYI $MYSQL_PATH/
|
||||
fi
|
||||
|
||||
|
||||
if [ -h "$MYSQL_PATH/partrepair.frm" ] && [ -f $PATH_RAMDISK/partrepair.MYD ]; then
|
||||
rm $MYSQL_PATH/partrepair.frm
|
||||
mv $PATH_RAMDISK/partrepair.frm $MYSQL_PATH/
|
||||
fi
|
||||
if [ -h "$MYSQL_PATH/partrepair.MYD" ] && [ -f $PATH_RAMDISK/partrepair.MYD ]; then
|
||||
rm $MYSQL_PATH/partrepair.MYD
|
||||
mv $PATH_RAMDISK/partrepair.MYD $MYSQL_PATH/
|
||||
fi
|
||||
if [ -h "$MYSQL_PATH/partrepair.MYI" ] && [ -f $PATH_RAMDISK/partrepair.MYD ]; then
|
||||
rm $MYSQL_PATH/partrepair.MYI
|
||||
mv $PATH_RAMDISK/partrepair.MYI $MYSQL_PATH/
|
||||
fi
|
||||
|
||||
|
||||
if [ -h "$MYSQL_PATH/binaries.frm" ] && [ -f $PATH_RAMDISK/binaries.frm ]; then
|
||||
rm $MYSQL_PATH/binaries.frm
|
||||
mv $PATH_RAMDISK/binaries.frm $MYSQL_PATH/
|
||||
fi
|
||||
if [ -h "$MYSQL_PATH/binaries.MYD" ] && [ -f $PATH_RAMDISK/binaries.MYD ]; then
|
||||
rm $MYSQL_PATH/binaries.MYD
|
||||
mv $PATH_RAMDISK/binaries.MYD $MYSQL_PATH/
|
||||
fi
|
||||
if [ -h "$MYSQL_PATH/binaries.MYI" ] && [ -f $PATH_RAMDISK/binaries.MYI ]; then
|
||||
rm $MYSQL_PATH/binaries.MYI
|
||||
mv $PATH_RAMDISK/binaries.MYI $MYSQL_PATH/
|
||||
fi
|
||||
|
||||
chown -R mysql:mysql $MYSQL_PATH
|
||||
|
||||
#determine if ramdisk is in fstab
|
||||
if [[ `mount | grep "$PATH_RAMDISK"` ]]; then
|
||||
umount "$PATH_RAMDISK"
|
||||
fi
|
||||
|
||||
/etc/init.d/mysql start
|
||||
exit
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
DIR="$( dirname "$SOURCE" )"
|
||||
while [ -h "$SOURCE" ]
|
||||
do
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
||||
# Make sure only root can run our script
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source ../defaults.sh
|
||||
eval $( $SED -n "/^define/ { s/.*('\([^']*\)', '*\([^']*\)'*);/export \1=\"\2\"/; p }" "$NEWZPATH"/www/config.php )
|
||||
|
||||
#updates to newest svn
|
||||
svn co --force --username svnplus --password $SVN_PASSWORD svn://svn.newznab.com/nn/branches/nnplus $NEWZPATH/
|
||||
sleep 2
|
||||
|
||||
#force download/overwrite of current svn
|
||||
svn export --force --username svnplus --password $SVN_PASSWORD svn://svn.newznab.com/nn/branches/nnplus $NEWZPATH/
|
||||
|
||||
#Get the path to tmpunrar
|
||||
TMPUNRAR_QUERY="SELECT value from site where setting = \"tmpunrarpath\";"
|
||||
TMPUNRAR_PATH=`$MYSQL --defaults-file=../conf/my.cnf -u$DB_USER -h$DB_HOST $DB_NAME -s -N -e "${TMPUNRAR_QUERY}"`
|
||||
TMPUNRAR_PATH=$TMPUNRAR_PATH"1"
|
||||
|
||||
#remove the ramdisk
|
||||
if [[ ! `mountpoint -q $TMPUNRAR_PATH` ]]; then
|
||||
umount $TMPUNRAR_PATH &> /dev/null
|
||||
fi
|
||||
|
||||
#remove the temp folder
|
||||
rm -r $TMPUNRAR_PATH
|
||||
|
||||
echo "My edits have been removed"
|
||||
|
||||
exit
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user