#!/bin/bash
OUTPUTFLDR="/tmp/skindesigner"
mkdir -p "$OUTPUTFLDR"

#cleanup
rm -f "$OUTPUTFLDR/vdrcpu" "$OUTPUTFLDR/vdrmem"

read vdrcpu vdrmem <<<$(ps -p $(pidof vdr) -o %cpu=,%mem=)
echo $vdrcpu > "$OUTPUTFLDR/vdrcpu"
echo $vdrmem > "$OUTPUTFLDR/vdrmem"
