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 } couchpotato_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 } couchpotato_updateplg() { cd /boot/config/plugins [ -f couchpotato_v2_unplugged.64bit.plg.old ] && rm -f couchpotato_v2_unplugged.64bit.plg.old if [ -f couchpotato_v2_unplugged.64bit.plg ]; then mv couchpotato_v2_unplugged.64bit.plg couchpotato_v2_unplugged.64bit.plg.old echo "Updating plugin" wget -q --no-check-certificate https://github.com/sacretagent/Unplugged_64Bit_Unraid.6/raw/master/couchpotato_v2_unplugged.64bit.plg /usr/local/sbin/installplg /boot/config/plugins/couchpotato_v2_unplugged.64bit.plg else echo "Updating plugin" wget -q --no-check-certificate https://github.com/sacretagent/Unplugged_64Bit_Unraid.6/raw/master/couchpotato_v2_unplugged.64bit.plg /usr/local/sbin/installplg /boot/config/plugins/couchpotato_v2_unplugged.64bit.plg fi } couchpotato_downgradeplg() { cd /boot/config/plugins if [ -f couchpotato_v2_unplugged.64bit.plg.old ]; then rm -f couchpotato_v2_unplugged.64bit.plg mv couchpotato_v2_unplugged.64bit.plg.old couchpotato_v2_unplugged.64bit.plg echo "downgrading plugin" /usr/local/sbin/installplg /boot/config/plugins/couchpotato_v2_unplugged.64bit.plg fi } couchpotato_vercheck() { set -x if [ -e $DATADIR/cache/version ]; then curversion=$( cat $DATADIR/cache/version ) echo "$curversion" fi } # read our configuration source /boot/config/plugins/couchpotato_v2/couchpotato_v2.cfg if [ -e "$CONFIGFILE" ]; then DATADIR=`cat "$CONFIGFILE" | grep 'data_dir' | cut -d' ' -f3` PORT=`cat "$CONFIGFILE" | grep 'port = ' | cut -d' ' -f3 | awk 'NR==2'` fi case "$1" in 'start') couchpotato_start ;; 'stop') couchpotato_stop ;; 'restart') couchpotato_restart ;; 'enable') couchpotato_enable $2 $3 $4 $5 $6 $7 $8 $9 ;; 'disable') couchpotato_disable $2 $3 $4 $5 $6 $7 $8 $9 ;; 'install') couchpotato_install ;; # 'update') # couchpotato_update # ;; 'storagesize') couchpotato_storagesize $2 $3 ;; 'datacheck') couchpotato_datacheck ;; 'updateplg') couchpotato_updateplg ;; 'downgradeplg') couchpotato_downgradeplg ;; 'buttonstart') couchpotato_buttonstart ;; # 'vercheck') # couchpotato_vercheck # ;; *) echo "usage $0 start|stop|restart|enable|disable|install|update|storagesize|datacheck|updateplg|downgradeplg" esac ]]>Installed from =$couchpotato_cfg[BRANCH]?> branch of =$couchpotato_cfg[INSTALLURL]?> site
if ($couchpotato_cfg[PLG_STORAGESIZE]=="yes"): ?> =$couchpotato_datasize?> endif; ?> if ($couchpotato_cfg[PLG_DATACHECK]=="yes"): ?> =$couchpotato_datacheck?> endif; ?>Plug-in Version: =$couchpotato_plgver;?>
endif; ?>