Skip to content

Instantly share code, notes, and snippets.

View n-shay's full-sized avatar

Shay Nissel n-shay

View GitHub Profile
@n-shay
n-shay / radarr_cleanup.php
Last active March 26, 2018 19:34
A PHP script ran by Radarr for cleaning up files extracted by Transmission post processing bash (trasmissionUnRAR.sh)
#!/usr/bin/env php
<?php
// Do some echoing, why? why not..
echo "Starting the Radarr_cleanup.php postprocessing script\n";
// for some reason, environment variables from the cli is hiding in $_SERVER, don't ask me, php is silly sometimes
$envVars = $_SERVER;
// All the env variables attached to variables
@n-shay
n-shay / sonarr_cleanup.php
Last active March 26, 2018 19:34
A PHP script ran by Sonarr for cleaning up files extracted by Transmission post processing bash (trasmissionUnRAR.sh)
#!/usr/bin/env php
<?php
// Do some echoing, why? why not..
echo "Starting the Sonarr_cleanup.php postprocessing script\n";
// for some reason, environment variables from the cli is hiding in $_SERVER, don't ask me, php is silly sometimes
$envVars = $_SERVER;
// All the env variables attached to variables
@n-shay
n-shay / transmissionUnRAR.sh
Last active March 26, 2018 19:34
A post processing bash script for Transmission for UnRARing (based on directory name)
#!/bin/bash
# keywords which the torrent path must contain to run the script
DIR_CONTAINS=( )
DIR_CONTAINS+=( "TV" )
DIR_CONTAINS+=( "Movies" )
echo "Checking $TR_TORRENT_DIR/$TR_TORRENT_NAME" >> /var/log/posttorrent.log
# loop through each keyword