mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
added check to ensure that your defaults.sh has all of the variables in config.sh, added sudo commands where necessary
This commit is contained in:
@@ -51,7 +51,9 @@
|
||||
cd ../ && ./start.sh
|
||||
```
|
||||
|
||||
* Additional scripts included in the script folder. I have included prepare.sh to make updating these sctipts alittle easier. I also included a svn updater, svn.sh. It performs a forced updated, which overwrites any changes you may have may to the stock nn+ scripts.
|
||||
* Several commands require root priviledges, such as editing files, chmod the paths, creating the ramdisk. If you have grsec compiled into your kernel, you will also need root priviledges for nmon and any other network monitoring app.
|
||||
|
||||
* Additional scripts included in the script folder. I have included prepare.sh to make updating these scripts a little easier. I also included an svn updater, update_svn.sh. It performs a forced svn update, which overwrites any changes you may have may to the stock nn+ scripts and the updates the database. Also, included is revert.sh. This file removes the changes made to postprocess.sh and you need to run this before running stock update_releases.php.
|
||||
|
||||
* Any variable in defaults.sh can be changed, except the paths to the commands, and the changed will take effect on the next loop of the monitor. By default, the monitor loops every 30 seconds
|
||||
|
||||
@@ -63,6 +65,8 @@
|
||||
|
||||
* Take caution that Optimize is not running when you shut down the scripts, Optimize runs in window 2, pane 4.
|
||||
|
||||
* Before submitting a bug report, please verify that you are running the current revision of nn+ and these scripts. Then include as much detail as possible.
|
||||
|
||||
* Join in the converstion at irc://irc.synirc.net/newznab-tmux.
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
#!/usr/bin/env bash
|
||||
export ALLOW_START="true"
|
||||
if [ -z "$RUNNING" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$IMPORT" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$NZB_THREADS" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$NZBCOUNT" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$IMPORT_SLEEP" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$IMPORT_MAX_RELEASES" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$RELEASES" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$RELEASES_SLEEP" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$OPTIMIZE" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$MYISAM_SMALL" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$MYISAM_LARGE" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$INNODB_SMALL" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$INNODB_LARGE" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$INNODB" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$CLEANUP" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$CLEANUP_TIMER" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$PARSING" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$PARSING_TIMER" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$PREDB_TIMER" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$TVRAGE_TIMER" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$SPHINX" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$SPHINX_TIMER" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$SED" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$USE_HTOP" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$USE_NMON" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$USE_BWMNG" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$USE_IOTOP" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$USE_MYTOP" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$USE_VNSTAT" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$USE_IFTOP" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$POWERLINE" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$RAMDISK" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$AGREED" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$MYSQL" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$PHP" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$TMUXCMD" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$NICE" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$TMUX_CONF" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$RUNNING" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$NEWZPATH" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$NEWZNAB_PATH" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$TESTING_PATH" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$ADMIN_PATH" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$POST_TO_RUN" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$TMUX_SESSION" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$MONITOR_UPDATE" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$BINARIES" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$BINARIES_THREADS" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$BINARIES_SLEEP" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$MAX_RELEASES" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$BACKFILL" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$BACKFILL_THREADS" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$BACKFILL_SLEEP" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$BACKFILL_MAX_RELEASES" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$MAXDAYS" ]; then export ALLOW_START="false"; fi
|
||||
if [ -z "$NZBS" ]; then export ALLOW_START="false"; fi
|
||||
+11
-11
@@ -14,17 +14,17 @@ source ../defaults.sh
|
||||
|
||||
|
||||
if [ -f $NEWZPATH/www/lib/postprocess.php ]; then
|
||||
$SED -i -e 's/\/\/$this->processAdditional();/$this->processAdditional();/' $NEWZPATH/www/lib/postprocess.php
|
||||
$SED -i -e 's/\/\/$this->processNfos();/$this->processNfos();/' $NEWZPATH/www/lib/postprocess.php
|
||||
$SED -i -e 's/\/\/$this->processUnwanted();/$this->processUnwanted();/' $NEWZPATH/www/lib/postprocess.php
|
||||
$SED -i -e 's/\/\/$this->processMovies();/$this->processMovies();/' $NEWZPATH/www/lib/postprocess.php
|
||||
$SED -i -e 's/\/\/$this->processMusic();/$this->processMusic();/' $NEWZPATH/www/lib/postprocess.php
|
||||
$SED -i -e 's/\/\/$this->processBooks();/$this->processBooks();/' $NEWZPATH/www/lib/postprocess.php
|
||||
$SED -i -e 's/\/\/$this->processGames();/$this->processGames();/' $NEWZPATH/www/lib/postprocess.php
|
||||
$SED -i -e 's/\/\/$this->processTv();/$this->processTv();/' $NEWZPATH/www/lib/postprocess.php
|
||||
$SED -i -e 's/\/\/$this->processMusicFromMediaInfo();/$this->processMusicFromMediaInfo();/' $NEWZPATH/www/lib/postprocess.php
|
||||
$SED -i -e 's/\/\/$this->processOtherMiscCategory();/$this->processOtherMiscCategory();/' $NEWZPATH/www/lib/postprocess.php
|
||||
$SED -i -e 's/\/\/$this->processUnknownCategory();/$this->processUnknownCategory();/' $NEWZPATH/www/lib/postprocess.php
|
||||
sudo $SED -i -e 's/\/\/$this->processAdditional();/$this->processAdditional();/' $NEWZPATH/www/lib/postprocess.php
|
||||
sudo $SED -i -e 's/\/\/$this->processNfos();/$this->processNfos();/' $NEWZPATH/www/lib/postprocess.php
|
||||
sudo $SED -i -e 's/\/\/$this->processUnwanted();/$this->processUnwanted();/' $NEWZPATH/www/lib/postprocess.php
|
||||
sudo $SED -i -e 's/\/\/$this->processMovies();/$this->processMovies();/' $NEWZPATH/www/lib/postprocess.php
|
||||
sudo $SED -i -e 's/\/\/$this->processMusic();/$this->processMusic();/' $NEWZPATH/www/lib/postprocess.php
|
||||
sudo $SED -i -e 's/\/\/$this->processBooks();/$this->processBooks();/' $NEWZPATH/www/lib/postprocess.php
|
||||
sudo $SED -i -e 's/\/\/$this->processGames();/$this->processGames();/' $NEWZPATH/www/lib/postprocess.php
|
||||
sudo $SED -i -e 's/\/\/$this->processTv();/$this->processTv();/' $NEWZPATH/www/lib/postprocess.php
|
||||
sudo $SED -i -e 's/\/\/$this->processMusicFromMediaInfo();/$this->processMusicFromMediaInfo();/' $NEWZPATH/www/lib/postprocess.php
|
||||
sudo $SED -i -e 's/\/\/$this->processOtherMiscCategory();/$this->processOtherMiscCategory();/' $NEWZPATH/www/lib/postprocess.php
|
||||
sudo $SED -i -e 's/\/\/$this->processUnknownCategory();/$this->processUnknownCategory();/' $NEWZPATH/www/lib/postprocess.php
|
||||
fi
|
||||
|
||||
echo "my edits have been removed"
|
||||
|
||||
@@ -18,14 +18,10 @@ if [[ $AGREED == "no" ]]; then
|
||||
fi
|
||||
|
||||
echo "Fixing permisions, this can take some time if you have a large set of releases"
|
||||
chmod 777 $NEWZPATH/www/lib/smarty/templates_c
|
||||
chmod -R 777 $NEWZPATH/www/covers
|
||||
chmod 777 $NEWZPATH/www
|
||||
chmod 777 $NEWZPATH/www/install
|
||||
mkdir -p $NEWZPATH/nzbfiles/tmpunrar2/
|
||||
mkdir -p $NEWZPATH/nzbfiles/tmpunrar3/
|
||||
mkdir -p $NEWZPATH/nzbfiles/tmpunrar4/
|
||||
chmod -R 777 $NEWZPATH/nzbfiles
|
||||
sudo chmod 777 $NEWZPATH/www/lib/smarty/templates_c
|
||||
sudo chmod -R 777 $NEWZPATH/www/covers
|
||||
sudo chmod 777 $NEWZPATH/www
|
||||
sudo chmod 777 $NEWZPATH/www/install
|
||||
|
||||
echo -e "\033[38;5;160mCompleted\033[39m"
|
||||
|
||||
|
||||
@@ -17,6 +17,15 @@ fi
|
||||
|
||||
source defaults.sh
|
||||
|
||||
#verify all variables exist
|
||||
source bin/test_defaults.sh
|
||||
if [[ $ALLOW_START == "false" ]]; then
|
||||
clear
|
||||
echo "Please copy config.sh to defaults.sh, your current copy is outdated."
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
eval $( $SED -n "/^define/ { s/.*('\([^']*\)', '*\([^']*\)'*);/export \1=\"\2\"/; p }" "$NEWZPATH"/www/config.php )
|
||||
|
||||
if [[ $AGREED == "no" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user