Storage memory usage: install + data directory: $INST
" else echo "Storage memory usage: install directory: $INST, data directory: $DAT
" fi elif [ $1 ]; then if [ -d $1 ]; then INST=`du -sh $1 | cut -f1` elif [ -f $1 ]; then INST=`ls -lah $1 | awk '{ print $5}'` fi echo "Storage memory usage: $INST
" fi } PlexConnect_datacheck() { array=( ramfs proc tempfs sysfs ) fs=$( stat -f -c '%T' $DATADIR ) for i in "${array[@]}" do if [ $i = $fs ]; then echo "WARNING: Your Data Directory is not persistent and WILL NOT survive a reboot. Please locate Data Directory on disk for persistency
" break elif [ $i = msdos ]; then echo "WARNING: Your Data Directory is located on your flash drive. This will decrease your flash drives life span!
" break else echo "Your data will persist after a reboot
" break fi done } PlexConnect_updateplg() { cd /boot/config/plugins if [ -f Plexconnect_V3_with_Cert.plg ]; then [ -f Plexconnect_V3_with_Cert.plg.old ] && rm -f Plexconnect_V3_with_Cert.plg.old mv Plexconnect_V3_with_Cert.plg Plexconnect_V3_with_Cert.plg.old echo "Updating plugin" wget -q --no-check-certificate https://raw.github.com/sacretagent/UNplugged/master/Plexconnect_V3_with_Cert.plg /usr/local/sbin/installplg /boot/config/plugins/Plexconnect_V3_with_Cert.plg else echo "Updating plugin" wget -q --no-check-certificate https://raw.github.com/sacretagent/UNplugged/master/Plexconnect_V3_with_Cert.plg /usr/local/sbin/installplg /boot/config/plugins/Plexconnect_V3_with_Cert.plg fi } PlexConnect_downgradeplg() { cd /boot/config/plugins if [ -f Plexconnect_V3_with_Cert.plg.old ]; then rm -f /Plexconnect_V3_with_Cert.plg mv Plexconnect_V3_with_Cert.plg.old Plexconnect_V3_with_Cert.plg echo "downgrading plugin" /usr/local/sbin/installplg /boot/config/plugins/Plexconnect_V3_with_Cert.plg fi } PlexConnect_vercheck() { cd $INSTALLDIR curversion=$( git rev-parse HEAD ) echo "$curversion" } # read our configuration source /boot/config/plugins/PlexConnect/PlexConnect.cfg case "$1" in 'start') PlexConnect_start ;; 'stop') PlexConnect_stop ;; 'restart') PlexConnect_restart ;; 'enable') PlexConnect_enable $2 $3 $4 $5 $6 $7 $8 ;; 'disable') PlexConnect_disable $2 $3 $4 $5 $6 $7 $8 ;; 'install') PlexConnect_install ;; 'update') PlexConnect_update ;; 'storagesize') PlexConnect_storagesize $2 $3 ;; 'datacheck') PlexConnect_datacheck ;; 'updateplg') PlexConnect_updateplg ;; 'downgradeplg') PlexConnect_downgradeplg ;; 'buttonstart') PlexConnect_buttonstart ;; 'vercheck') PlexConnect_vercheck ;; *) echo "usage $0 start|stop|restart|enable|disable|install|update|datacheck|updateplg|downgradeplg" esac ]]>PlexConnect is installed with version: =$PlexConnect_curversion;?>
if ($PlexConnect_cfg[PLG_STORAGESIZE]=="yes"): ?> =$PlexConnect_datasize?> endif; ?> if ($PlexConnect_cfg[PLG_DATACHECK]=="yes"): ?> =$PlexConnect_datacheck?> endif; ?>Plug-in Version: =$PlexConnect_plgver;?>
if (strcmp($PlexConnect_curversion, $PlexConnect_newversion)!=0 && $PlexConnect_curversion!="couldn't determine the PlexConnect version"): ?>