Home of the Squeezebox™ & Transporter® network music players.
Page 3 of 3 FirstFirst 123
Results 21 to 22 of 22
  1. #21
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Location
    Nottingham, UK
    Posts
    2,093
    Quote Originally Posted by Paul Webster View Post
    The "set" was just to show you how to see the environment variables and filter them to pick one.
    You could then use it like this ...
    Code:
    tc@PiTouch:~$ ./test.sh $BOOTDEV
    Booted from /dev/mmcblk0p1
    Code:
    tc@PiTouch:~$ cat test.sh
    #!/bin/sh
    echo "Booted from $1"
    However, that might not work from a cron job ... so copying the pCP way of doing it is wise.
    I must admit, I didn't think of passing the variable as $1 (still have some way to go before I'm proficient at this I think), but yeah, I'm not sure whether the environment variables available in a 'tc' terminal shell would also be available to a cron job run by root. And since my script works as is, I'm going to pass on the opportunity to check!

  2. #22
    Junior Member
    Join Date
    Dec 2019
    Posts
    21
    Quote Originally Posted by chill View Post
    I must admit, I didn't think of passing the variable as $1 (still have some way to go before I'm proficient at this I think), but yeah, I'm not sure whether the environment variables available in a 'tc' terminal shell would also be available to a cron job run by root. And since my script works as is, I'm going to pass on the opportunity to check!
    Thanks for the advice. I kicked it up to 2000MB.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •