NSLU2-Linux
view · edit · print · history

Puppy.UserContributions History

Hide minor edits - Show changes to markup

August 31, 2005, at 01:37 PM by Tony Tsui --
Changed line 10 from:
  • Guppy by Tony Tsui. Graphical User Interface to puppy.
to:
  • Guppy by Tony Tsui. Graphical User Interface to puppy.
August 23, 2005, at 01:23 PM by Tony Tsui --
Changed lines 9-10 from:
  • SendMp3sToToppy by epg. Copies a directory and its mp3s to the mp3 directory on the Topfield...
to:
  • SendMp3sToToppy by epg. Copies a directory and its mp3s to the mp3 directory on the Topfield...
  • Guppy by Tony Tsui. Graphical User Interface to puppy.
March 28, 2005, at 09:26 AM by epg --
Changed lines 8-9 from:
  • CopyFiles by Malcolm. Wrapper scripts for puppy -c get...
to:
  • CopyFiles by Malcolm. Wrapper scripts for puppy -c get...
  • SendMp3sToToppy by epg. Copies a directory and its mp3s to the mp3 directory on the Topfield...
February 28, 2005, at 12:08 PM by Malcolm --
Changed line 8 from:
  • CopyFiles? by Malcolm. Wrapper scripts for puppy -c get...
to:
  • CopyFiles by Malcolm. Wrapper scripts for puppy -c get...
February 28, 2005, at 11:44 AM by Malcolm --
Changed line 8 from:
  • Pget? by Malcolm. Wrapper for puppy -c get...
to:
  • CopyFiles? by Malcolm. Wrapper scripts for puppy -c get...
February 28, 2005, at 11:43 AM by Malcolm --
Added line 8:
  • Pget? by Malcolm. Wrapper for puppy -c get...
February 21, 2005, at 12:07 AM by peteru --
Changed lines 7-77 from:

I use this script I called "puppycron" to copy tgd files to the Topfield that have been ftp uploaded by "TED" or "TEDS" (it also gets the log and tsv out the toppy too). So you will also need to download an ftpd to allow the ftp to operate.

http://www.nslu2-linux.org/wiki/HowTo/SetupFtpd

Add this line to /etc/inetd.conf

 ftp stream tcp nowait root /bin/ftpd ftpd

or you could put a diversion script in /unslung called rc.xinetd and put the following lines in:

 #!/bin/sh
 if ( [ ! -f /etc/inetd.conf ] || !(grep ftpd /etc/inetd.conf -q) ) then
       echo "ftp stream tcp nowait root /bin/ftpd ftpd" >> /etc/inetd.conf
 fi
 return 1

Edit your /etc/passwd file to ensure the anonymous ftp user is allowed access to the correct directory:

 ftp:x:14:50:FTP User:/share/hdd/data/topfield:

Create the puppycron script, and put it into /opt/bin (also, you should chmod +x the file to make it executable)

 #!/bin/sh
 cd /share/hdd/data/topfield/EPG
 if ps | grep -v grep | grep -q "puppy "; then
 else
  if /opt/bin/puppy -qc cancel; then
   for i in *.tgd
   do echo $i ;
     if test -e $i ; then
      /opt/bin/puppy -qc cancel ; /opt/bin/puppy -qc cancel ; /opt/bin/puppy -qc put $i \\EPG\\$i
      rm $i
     fi
   done
   sleep 5
   if /opt/bin/puppy -qc dir EPG |grep -q epg_timers.tsv ; then
    /opt/bin/puppy -qc get 'EPG\epg_timers.tsv' epg_timers.tsv
    chmod 777 epg_timers.tsv
   fi
   if /opt/bin/puppy -qc dir EPG |grep -q epg_upload.log ; then
    /opt/bin/puppy -qc get 'EPG\epg_upload.log' epg_upload.log
   chmod 777 epg_upload.log
   fi
  fi
 fi

Edit your /etc/crontab file so the script can occur regularly:

 SHELL=/bin/sh
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 MAILTO=""
 HOME=/
 # ---------- ---------- Default is Empty ---------- ---------- #
 0 0-23/8 * * * root /usr/sbin/CheckDiskFull &>/dev/null
 0 0 * * * root /usr/sbin/WatchDog &>/dev/null
 1 * * * * root /usr/sbin/hwclock -s &>/dev/null
 0-55/5 * * * * root /opt/bin/puppycron &>/dev/null 

(will launch puppycron every 5 mins, will therefore every 5mins look for new files to upload, and download the tsv/log file)

Create your EPG etc directories off the /share/hdd/data/topfield directory and make sure they have permissions for the ftp user to read and write to them. And enjoy the TED/TEDS connectivity and features that windows users have, all via the SLUG running puppy to get long distance access to your Topfield (with TED/TEDs running on a remote windows PC which will ftp into the slug, if you setup TED/TEDS according).

regards Tony

to:
  • PuppyCron by Tony. Copies tgd files to the Topfield that have been ftp uploaded by "TED" or "TEDS".
February 19, 2005, at 04:09 AM by tonymy01 --
Added lines 5-6:

February 19, 2005, at 04:08 AM by tonymy01 --
Changed line 25 from:

Edit your /etc/passwd file to ensure the ftp user is allowed access and to set the correct directory:

to:

Edit your /etc/passwd file to ensure the anonymous ftp user is allowed access to the correct directory:

Changed line 55 from:

Edit your /etc/crontab file so the script can occur regularly

to:

Edit your /etc/crontab file so the script can occur regularly:

Changed lines 68-69 from:

(will launch puppycron every 5 mins)

to:

(will launch puppycron every 5 mins, will therefore every 5mins look for new files to upload, and download the tsv/log file)

Changed line 72 from:

And enjoy the TED/TEDS connectivity and features that windows users have, all via the SLUG running puppy to get long distance access to your Topfield (with TED/TEDs running on a remote PC which will ftp into the slug, if you setup TED/TEDS according)

to:

And enjoy the TED/TEDS connectivity and features that windows users have, all via the SLUG running puppy to get long distance access to your Topfield (with TED/TEDs running on a remote windows PC which will ftp into the slug, if you setup TED/TEDS according).

Changed lines 74-75 from:

regards\\Tony

to:

regards Tony

February 19, 2005, at 04:05 AM by tonymy01 --
Changed lines 11-12 from:

ftp stream tcp nowait root /bin/ftpd ftpd

to:
 ftp stream tcp nowait root /bin/ftpd ftpd
Changed lines 73-75 from:

regards

Tony

to:

regards\\Tony

February 19, 2005, at 04:04 AM by tonymy01 --
Changed lines 56-64 from:
 [@bash-2.05b# cat /etc/crontab
SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=""
HOME=/
# ---------- ---------- Default is Empty ---------- ---------- #
0 0-23/8 * * * root /usr/sbin/CheckDiskFull? &>/dev/null
0 0 * * * root /usr/sbin/WatchDog? &>/dev/null
1 * * * * root /usr/sbin/hwclock -s &>/dev/null\\
to:
 [@SHELL=/bin/sh
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 MAILTO=""
 HOME=/
 # ---------- ---------- Default is Empty ---------- ---------- #
 0 0-23/8 * * * root /usr/sbin/CheckDiskFull? &>/dev/null
 0 0 * * * root /usr/sbin/WatchDog? &>/dev/null
 1 * * * * root /usr/sbin/hwclock -s &>/dev/null
Changed lines 68-69 from:

Create your EPG etc directories off the /share/hdd/data/topfield directory and make sure they have permissions for the ftp user to read and write And enjoy the TED/TEDS connectivity and features that windows users have, all via the SLUG running puppy to get long distance access to your Topfield!

to:

Create your EPG etc directories off the /share/hdd/data/topfield directory and make sure they have permissions for the ftp user to read and write to them. And enjoy the TED/TEDS connectivity and features that windows users have, all via the SLUG running puppy to get long distance access to your Topfield (with TED/TEDs running on a remote PC which will ftp into the slug, if you setup TED/TEDS according)

Added line 73:
February 19, 2005, at 04:02 AM by tonymy01 --
Changed lines 30-45 from:

[@#!/bin/sh cd /share/hdd/data/topfield/EPG if ps | grep -v grep | grep -q "puppy "; then else

 if /opt/bin/puppy -qc cancel; then
  for i in *.tgd
  do echo $i ;
    if test -e $i ; then
     /opt/bin/puppy -qc cancel ; /opt/bin/puppy -qc cancel ; /opt/bin/puppy -qc put $i \\EPG\\$i
     rm $i
    fi
  done
  sleep 5
  if /opt/bin/puppy -qc dir EPG |grep -q epg_timers.tsv ; then
   /opt/bin/puppy -qc get 'EPG\epg_timers.tsv' epg_timers.tsv
   chmod 777 epg_timers.tsv
to:
 [@#!/bin/sh
 cd /share/hdd/data/topfield/EPG
 if ps | grep -v grep | grep -q "puppy "; then
 else
  if /opt/bin/puppy -qc cancel; then
   for i in *.tgd
   do echo $i ;
     if test -e $i ; then
      /opt/bin/puppy -qc cancel ; /opt/bin/puppy -qc cancel ; /opt/bin/puppy -qc put $i \\EPG\\$i
      rm $i
     fi
   done
   sleep 5
   if /opt/bin/puppy -qc dir EPG |grep -q epg_timers.tsv ; then
    /opt/bin/puppy -qc get 'EPG\epg_timers.tsv' epg_timers.tsv
    chmod 777 epg_timers.tsv
   fi
   if /opt/bin/puppy -qc dir EPG |grep -q epg_upload.log ; then
    /opt/bin/puppy -qc get 'EPG\epg_upload.log' epg_upload.log
   chmod 777 epg_upload.log
   fi
Changed lines 52-57 from:
  if /opt/bin/puppy -qc dir EPG |grep -q epg_upload.log ; then
   /opt/bin/puppy -qc get 'EPG\epg_upload.log' epg_upload.log
  chmod 777 epg_upload.log
  fi
 fi

fi@]

to:
 fi@]
Changed lines 56-65 from:
bash-2.05b# cat /etc/crontab\\
SHELL=/bin/sh\\
PATH=/sbin:/bin:/usr/sbin:/usr/bin\\
MAILTO=""\\
HOME=/\\
# ---------- ---------- Default is Empty ---------- ---------- #\\
0 0-23/8 * * * root /usr/sbin/CheckDiskFull &>/dev/null\\
0 0 * * * root /usr/sbin/WatchDog &>/dev/null\\
1 * * * * root /usr/sbin/hwclock -s &>/dev/null\\
0-55/5 * * * * root /opt/bin/puppycron &>/dev/null
to:
 
bash-2.05b# cat /etc/crontab\\
 SHELL=/bin/sh\\
 PATH=/sbin:/bin:/usr/sbin:/usr/bin\\
 MAILTO=""\\
 HOME=/\\
 # ---------- ---------- Default is Empty ---------- ---------- #\\
 0 0-23/8 * * * root /usr/sbin/CheckDiskFull &>/dev/null\\
 0 0 * * * root /usr/sbin/WatchDog &>/dev/null\\
 1 * * * * root /usr/sbin/hwclock -s &>/dev/null\\
 0-55/5 * * * * root /opt/bin/puppycron &>/dev/null
February 19, 2005, at 04:01 AM by tonymy01 --
Changed line 11 from:

ftp stream tcp nowait root /bin/ftpd ftpd

to:

ftp stream tcp nowait root /bin/ftpd ftpd

Changed line 30 from:
 [@#!/bin/sh
to:

[@#!/bin/sh

Changed lines 56-64 from:

[@bash-2.05b# cat /etc/crontab SHELL=/bin/sh PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO="" HOME=/

  1. ---------- ---------- Default is Empty ---------- ---------- #

0 0-23/8 * * * root /usr/sbin/CheckDiskFull? &>/dev/null 0 0 * * * root /usr/sbin/WatchDog? &>/dev/null 1 * * * * root /usr/sbin/hwclock -s &>/dev/null

to:

[@bash-2.05b# cat /etc/crontab
SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=""
HOME=/
# ---------- ---------- Default is Empty ---------- ---------- #
0 0-23/8 * * * root /usr/sbin/CheckDiskFull? &>/dev/null
0 0 * * * root /usr/sbin/WatchDog? &>/dev/null
1 * * * * root /usr/sbin/hwclock -s &>/dev/null\\

February 19, 2005, at 04:00 AM by tonymy01 --
Changed lines 30-31 from:

#!/bin/sh cd /share/hdd/data/topfield/EPG

to:
 [@#!/bin/sh

cd /share/hdd/data/topfield/EPG

Changed lines 52-53 from:

fi

to:

fi@]

Changed lines 56-57 from:

bash-2.05b# cat /etc/crontab

to:

[@bash-2.05b# cat /etc/crontab

Deleted line 57:
Deleted line 58:
Deleted line 59:
Deleted line 60:
Deleted line 61:
Deleted line 62:
Deleted line 63:
Changed lines 65-66 from:

0-55/5 * * * * root /opt/bin/puppycron &>/dev/null

to:

0-55/5 * * * * root /opt/bin/puppycron &>/dev/null@]

February 19, 2005, at 03:56 AM by tonymy01 --
Changed line 26 from:
 ftp:x:14:50:FTP User:/share/hdd/data/topfield:
to:
 ftp:x:14:50:FTP User:/share/hdd/data/topfield:
Changed lines 30-31 from:
  1. !/bin/sh

cd /share/hdd/data/topfield/EPG

to:

#!/bin/sh cd /share/hdd/data/topfield/EPG

Added line 58:
Added line 60:
Added line 62:
Added line 64:
Added line 66:
Added line 68:
Added line 70:
Added line 72:
Added line 74:
Added line 76:
February 19, 2005, at 03:54 AM by tonymy01 --
Changed line 15 from:

[=

to:
Changed line 21 from:

=]

to:
Changed line 25 from:

[=

to:
Changed line 27 from:

=]

to:
Changed line 29 from:

[=

to:
Changed line 53 from:

=]

to:
Changed line 56 from:

[=

to:
Changed line 67 from:

=]

to:
February 19, 2005, at 03:54 AM by tonymy01 --
Changed line 15 from:
to:

[=

Changed line 21 from:
to:

=]

Added line 25:

[=

Changed line 27 from:
to:

=]

Added line 29:

[=

Changed line 53 from:
to:

=]

Added line 56:

[=

Changed line 67 from:
to:

=]

February 19, 2005, at 03:51 AM by tonymy01 --
Added lines 4-69:

I use this script I called "puppycron" to copy tgd files to the Topfield that have been ftp uploaded by "TED" or "TEDS" (it also gets the log and tsv out the toppy too). So you will also need to download an ftpd to allow the ftp to operate.

http://www.nslu2-linux.org/wiki/HowTo/SetupFtpd

Add this line to /etc/inetd.conf ftp stream tcp nowait root /bin/ftpd ftpd

or you could put a diversion script in /unslung called rc.xinetd and put the following lines in:

 #!/bin/sh
 if ( [ ! -f /etc/inetd.conf ] || !(grep ftpd /etc/inetd.conf -q) ) then
       echo "ftp stream tcp nowait root /bin/ftpd ftpd" >> /etc/inetd.conf
 fi
 return 1

Edit your /etc/passwd file to ensure the ftp user is allowed access and to set the correct directory:

 ftp:x:14:50:FTP User:/share/hdd/data/topfield:

Create the puppycron script, and put it into /opt/bin (also, you should chmod +x the file to make it executable)

  1. !/bin/sh

cd /share/hdd/data/topfield/EPG if ps | grep -v grep | grep -q "puppy "; then else

 if /opt/bin/puppy -qc cancel; then
  for i in *.tgd
  do echo $i ;
    if test -e $i ; then
     /opt/bin/puppy -qc cancel ; /opt/bin/puppy -qc cancel ; /opt/bin/puppy -qc put $i \\EPG\\$i
     rm $i
    fi
  done
  sleep 5
  if /opt/bin/puppy -qc dir EPG |grep -q epg_timers.tsv ; then
   /opt/bin/puppy -qc get 'EPG\epg_timers.tsv' epg_timers.tsv
   chmod 777 epg_timers.tsv
  fi
  if /opt/bin/puppy -qc dir EPG |grep -q epg_upload.log ; then
   /opt/bin/puppy -qc get 'EPG\epg_upload.log' epg_upload.log
  chmod 777 epg_upload.log
  fi
 fi

fi

Edit your /etc/crontab file so the script can occur regularly bash-2.05b# cat /etc/crontab SHELL=/bin/sh PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO="" HOME=/

  1. ---------- ---------- Default is Empty ---------- ---------- #

0 0-23/8 * * * root /usr/sbin/CheckDiskFull? &>/dev/null 0 0 * * * root /usr/sbin/WatchDog? &>/dev/null 1 * * * * root /usr/sbin/hwclock -s &>/dev/null 0-55/5 * * * * root /opt/bin/puppycron &>/dev/null

(will launch puppycron every 5 mins) Create your EPG etc directories off the /share/hdd/data/topfield directory and make sure they have permissions for the ftp user to read and write And enjoy the TED/TEDS connectivity and features that windows users have, all via the SLUG running puppy to get long distance access to your Topfield! regards Tony

February 19, 2005, at 02:05 AM by peteru --
Changed lines 1-3 from:

Describe UserContributions here.

to:

This page will provide links to user contributed projects and scripts that make use of puppy.

Feel free to explain how you improved on the basic puppy functionality and either add a link to your project, or paste your scripts in here.

view · edit · print · history · Last edited by Tony Tsui.
Based on work by Tony Tsui, epg, Malcolm, peteru, and tonymy01.
Originally by peteru.
Page last modified on August 31, 2005, at 01:37 PM