mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-28 17:01:16 +00:00
fixed reactivate_regexes.sh for all users
This commit is contained in:
@@ -1,11 +1,22 @@
|
||||
#!/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 )"
|
||||
|
||||
cd $DIR"/../conf"
|
||||
source $DIR"/../defaults.sh"
|
||||
|
||||
eval $( $SED -n "/^define/ { s/.*('\([^']*\)', '*\([^']*\)'*);/export \1=\"\2\"/; p }" "$NEWZPATH"/www/config.php )
|
||||
|
||||
cd $DIR"/conf"
|
||||
for fn in `cat active_regexes.txt`; do
|
||||
echo "Resetting $fn"
|
||||
mysql --defaults-file=my.cnf -uroot newznab -e "update releaseregex set status=1 where ID=$fn"
|
||||
echo "Resetting regex $fn"
|
||||
mysql --defaults-file=my.cnf -u$DB_USER -h $DB_HOST $DB_NAME -e "update releaseregex set status=1 where ID=$fn"
|
||||
done
|
||||
|
||||
|
||||
#rm active_regexes.txt
|
||||
rm active_regexes.txt
|
||||
|
||||
Reference in New Issue
Block a user