Jump to content

arkestler

Members
  • Posts

    27
  • Joined

  • Last visited

Posts posted by arkestler

  1. 2 hours ago, Cessquill said:

    Just by tweaking the post above yours, this will get close: */5 7-12 * * 7

     

    It should run every 5 minutes on a Sunday from 7-12, not 7.30.  I'm not personally aware of any way to put fractions in to hour ranges (somebody else might know), but if it has to be from 7.30 onwards then you could tweak your script by putting a quick bit of logic at the start.  Something like

     

    startTime="07:30"
    begin=$(date --date=$startTime +%s)
    now=$(date +%s)
    
    if [ "$now" -le "$begin" ]; then
    	exit 1
    fi

     

    ...would exit the script straight away for all times between 7 and 7.30.  Haven't tested it though - just patched it from a script that I used to run before I realised custom schedules were a thing.

    This is very helpful, thank you!

  2. I have been searching the web about custom time schedules and cannot find exactly what I am looking for.  If anyone can help me here that would be much appreciated.  I need my script to run every 5 minutes every Sunday from 7:30a til 12 noon.  Is this possible?

  3. 18 hours ago, SpaceInvaderOne said:

    After installing Big Sur next goto the docker template and choose Catalina, goto the bottom of the template click apply and it will then install catalina.

    Thanks, that worked great!  But I don't seem to be able to create a second Catalina VM.  Can this only be used to create a single instance of each OS or do I have to do something special to have multiple Catalina VMs?

  4. Just updated my server and I am getting the following error, also getting it for Preclear Disks.

    Unraid 6.3.5

    Unassigned Devices 2017.10.07

    Preclear Disks 2017.09.27

     

    Oct 20 21:22:08 Kes-Vault root: error: plugins/unassigned.devices/UnassignedDevices.php: wrong csrf_token
    Oct 20 21:22:09 Kes-Vault root: error: plugins/unassigned.devices/UnassignedDevices.php: wrong csrf_token
    Oct 20 21:22:10 Kes-Vault root: error: plugins/unassigned.devices/UnassignedDevices.php: wrong csrf_token
    Oct 20 21:22:11 Kes-Vault root: error: plugins/unassigned.devices/UnassignedDevices.php: wrong csrf_token
    Oct 20 21:22:12 Kes-Vault root: error: plugins/preclear.disk/Preclear.php: wrong csrf_token
    Oct 20 21:22:12 Kes-Vault root: error: plugins/unassigned.devices/UnassignedDevices.php: wrong csrf_token
    Oct 20 21:22:13 Kes-Vault root: error: plugins/unassigned.devices/UnassignedDevices.php: wrong csrf_token
    Oct 20 21:22:14 Kes-Vault root: error: plugins/preclear.disk/Preclear.php: wrong csrf_token
    Oct 20 21:22:14 Kes-Vault root: error: plugins/unassigned.devices/UnassignedDevices.php: wrong csrf_token
    Oct 20 21:22:16 Kes-Vault root: error: plugins/unassigned.devices/UnassignedDevices.php: wrong csrf_token
    Oct 20 21:22:17 Kes-Vault root: error: plugins/unassigned.devices/UnassignedDevices.php: wrong csrf_token
    Oct 20 21:22:17 Kes-Vault root: error: plugins/preclear.disk/Preclear.php: wrong csrf_token
    Oct 20 21:22:18 Kes-Vault root: error: plugins/unassigned.devices/UnassignedDevices.php: wrong csrf_token
    Oct 20 21:22:19 Kes-Vault root: error: plugins/unassigned.devices/UnassignedDevices.php: wrong csrf_token
    Oct 20 21:22:20 Kes-Vault root: error: plugins/unassigned.devices/UnassignedDevices.php: wrong csrf_token
    Oct 20 21:22:21 Kes-Vault root: error: plugins/unassigned.devices/UnassignedDevices.php: wrong csrf_token
    Oct 20 21:22:22 Kes-Vault root: error: plugins/unassigned.devices/UnassignedDevices.php: wrong csrf_token
    Oct 20 21:22:22 Kes-Vault root: error: plugins/preclear.disk/Preclear.php: wrong csrf_token
    Oct 20 21:22:23 Kes-Vault root: error: plugins/unassigned.devices/UnassignedDevices.php: wrong csrf_token

     

    Thanks in advance

     

  5. 12 hours ago, binhex said:

    @arkestler well its done, a bit of faffing around with dependencies (uuugggghh) with packages and its built, it has added an additional 34MB to the size of the compressed image, which is unfortunate, but you do now have access to ffmpeg, path is /usr/bin/ffmpeg, pull down the latest image and give it a go.

     Thanks!  I will see if I can get it working!

  6. The script that runs would be created by the user and can just be dropped into a volume mapping.  The user would create their own script and most likely just need to path to to the ffmpeg program.  In plex you just add the path to the script to run.  Below is the screenshot, and an example of what I am currently using as my script on a full blown machine, which does some other stuff too, but I would be happy to just get the conversion working in the docker.  

     

    59c1a84349ed3_ScreenShot2017-09-19at7_20_54PM.png.0d2e0a420a68e8177c5b16006c0bb541.png

     

    #!/bin/bash
    # ------------------------------------------------------------------
    #   Author [Kevin Fowlks]
    #
    #   Date 10/06/2016
    #
    #   Plex DVR Handbrake convert script for shrinking my recordings from my HDHomeRun CableCard.
    #
    #   Usage: ./convert.sh <input file>
    sleep $[ ( $RANDOM % 45 ) + 1 ]s
    
    NOW=$(date +"%m%d%Y")
    #PGMNAME=/usr/bin/HandBrakeCLI
    PGMNAME=/usr/bin/ffmpeg
    check_errs()
    {
        # Function. Parameter 1 is the return code
          # Para. 2 is text to display on failure.
            if [ "${1}" -ne "0" ]; then
              echo "ERROR # ${1} : ${2}"
              # as a bonus, make our script exit with the right error code.
              exit ${1}
            fi
    }
    
    BASEPATH=$(dirname "$1")
    BASEFILE=$(basename "$1")
    FILENAME="${BASEFILE%%.*}"
    
    #Check to see if postprocess script is running.  If so tell process to wait.  This is to ensure we don't have more than 1 convert process running at a time.  Keeps CPU happy.
    while [ -f /tmp/postProcessLock ]
    do
    sleep 60
    done
    
    touch /tmp/postProcessLock
    
    echo "Starting $NOW"
    
    echo "Starting Processing of $1" | mail -s "Plex Post Processing Started" email@email.com
    
    #set audio to English
    /usr/bin/mkvpropedit "$1" --edit track:a1 --set language=eng --edit track:v1 --set language=eng
    sleep 5
    
    #remove commercials
    comchap "$1"
    #comcut "$1"
    sleep 30
    
    #Original Handbrake
    #$PGMNAME -i "$1" -Z "AppleTV 2" -o "$BASEPATH/$FILENAME.mp4"
    
    #ffmpeg
    $PGMNAME -i "$1" -vf scale=-1:720 -c:v libx264 -crf 18 -preset fast -c:a copy "$BASEPATH/$FILENAME.mp4"
    #$PGMNAME -i "$1" -c:v libx264 "$BASEPATH/$FILENAME.mp4"
    
    #new Handbrake
    #$PGMNAME -i "$1" -f mp4 --aencoder copy -e x264 --x264-preset medium --x264-profile auto -q 16 --width 1280 --height 720 --decomb bob -o "$BASEPATH/$FILENAME.mp4"
    
    check_errs $? "Failed to convert file $1"
    
    sleep 20
    
    echo "Removing original file."
    rm -f "$1"
    
    sleep 10
    
    rm /tmp/postProcessLock
    
    sleep 10
    echo "Completed  Processing of $1" | mail -s "Plex Post Processing Completed" email@email.com
    
    check_errs $? "Failed to remove original file $1"

     

×
×
  • Create New...