diff --git a/glances.conf b/glances.conf index 0ef0be6..3b163d0 100644 --- a/glances.conf +++ b/glances.conf @@ -145,15 +145,12 @@ list_5_countmin=1 list_6_description=OpenFire list_6_regex=.*openfire.* list_6_countmin=1 -list_7_description=PleX Media Server -list_7_regex=.*[Pp]lex.* +list_7_description=MediaTomb +list_7_regex=.*mediatomb.* list_7_countmin=1 -list_8_description=MediaTomb -list_8_regex=.*mediatomb.* +list_8_description=Apache2 +list_8_regex=.*apache2.* list_8_countmin=1 -list_9_description=Apache2 -list_9_regex=.*apache2.* -list_9_countmin=1 #list_10_description=NFSd #list_10_regex=.*nfs.* #list_10_countmin=1 diff --git a/jffs2unpack.sh b/jffs2unpack.sh new file mode 100755 index 0000000..461a7b6 --- /dev/null +++ b/jffs2unpack.sh @@ -0,0 +1,59 @@ +#!/bin/bash +# Needs mtd-tools with jffs2reader + +if [ ! -f "$1" ]; then + echo "Syntax: $0 JFFS2IMAGE" + exit 1 +fi + +BASENAME=`basename "$1"` +OUTDIR="./${BASENAME}_unpack/" +mkdir $OUTDIR + +while read -u3 line; do +# echo "Line: $line" + PERMS=`echo $line | cut -d" " -f1` + SIZE=`echo $line | cut -d" " -f5` + FILE=`echo $line | cut -d" " -f6` + TYPE=${PERMS:0:1} + PERMS=${PERMS:1} +# echo "P:$PERMS S:$SIZE F:$FILE T:$TYPE" + + if [ "${FILE:0:1}" == "/" ]; then + FILE=${FILE:1} + fi + + PERMSU=`echo "${PERMS:0:3}" | sed 's/-//g'` + PERMSG=`echo "${PERMS:3:3}" | sed 's/-//g'` + PERMSO=`echo "${PERMS:6:3}" | sed 's/-//g'` + + FULLPERMS="u=$PERMSU,g=$PERMSG,o=$PERMSO" + + OUTFILE="$OUTDIR$FILE" + + case "$TYPE" in + "d") + OUTFILE="$OUTDIR$FILE" + echo "DIR: $FILE ($FULLPERMS) --> $OUTFILE" + mkdir "$OUTFILE" + chmod $FULLPERMS "$OUTFILE" + ;; + + "l") + LINKTARGET=`echo $line | cut -d" " -f8` + echo "Symlink: $FILE --> $LINKTARGET" + ln -s $LINKTARGET "$OUTFILE" + ;; + + "-") + echo "FILE: $FILE ($SIZE bytes, $FULLPERMS)" + jffs2reader "$1" -f "$FILE" > $OUTFILE + chmod $FULLPERMS "$OUTFILE" + ;; + + *) + echo "UNKNOWN!!!!!!! ($line)" + ;; + esac + +done 3< <(jffs2reader "$1") diff --git a/mp3gain_tracks.sh b/mp3gain_tracks.sh index 6ec2a81..febe180 100755 --- a/mp3gain_tracks.sh +++ b/mp3gain_tracks.sh @@ -9,6 +9,6 @@ if [ -z "$CONCURRENCY_LEVEL" ]; then fi echo "Processing using $CONCURRENCY_LEVEL processes..." -find "$@" -print0 | xargs -0 -P $CONCURRENCY_LEVEL -n 1 -I {} mp3gain -q -k -p -r -s i "{}" +nice -n2 find "$@" -print0 | xargs -0 -P $CONCURRENCY_LEVEL -n 1 -I {} mp3gain -q -k -p -r -s i "{}" echo "All done." diff --git a/mp3lame.sh b/mp3lame.sh old mode 100755 new mode 100644 index c084c5d..b0ad22b --- a/mp3lame.sh +++ b/mp3lame.sh @@ -9,6 +9,6 @@ if [ -z "$CONCURRENCY_LEVEL" ]; then fi echo "Processing using $CONCURRENCY_LEVEL processes..." -find "$@" -print0 | xargs -0 -P $CONCURRENCY_LEVEL -n 1 -I {} lame -m j --replaygain-fast --vbr-new -V 2 -o --id3v2-only --resample 44.1 --quiet "{}" "{}.mp3" +nice -n2 find "$@" -print0 | xargs -0 -P $CONCURRENCY_LEVEL -n 1 -I {} lame -m j --replaygain-fast --vbr-new -V 2 -o --id3v2-only --resample 44.1 --quiet "{}" "{}.mp3" echo "All done." diff --git a/yt2mp3_V4.sh b/yt2mp3_V4.sh new file mode 100755 index 0000000..5c6800c --- /dev/null +++ b/yt2mp3_V4.sh @@ -0,0 +1,7 @@ +#!/bin/sh +if [ "$#" = "0" ]; then + echo "Usage: $0 youtube-url output-filename" + exit 1 +fi + +youtube-dl "$1" -o - | avconv -i pipe:0 -f wav -vn - | lame -m j --replaygain-fast --vbr-new -V 4 -o --id3v2-only --resample 44.1 - "$2.mp3"