| Issue 25: | Adding script auto-upate | |
| 1 person starred this issue and may be notified of changes. | Back to list |
It would be very useful, expecially for non-GUI appliances.
Nov 28, 2011
Project Member
#1
addicted...@gmail.com
Labels:
-Priority-Low Priority-Medium
Nov 29, 2011
Dirty code for NMT PLATFORM
$crontab=/etc/cront/root.cron
$path_torrentexpander_update_script=/share/Apps/Transmission/bin/torrentexpander_update.sh
if [[ $auto_update == "yes" ]]; then
already_planned = crontab -l | grep torrentexpander
if [[ $already_planned == "" ]]; then
echo '@reboot $path_torrentexpander_update_script >> $crontab'
fi
fi
if [[ $auto_update == "no" ]]; then
cat $crontab | sed 'g/@reboot $path_torrentexpander_update_script//s > $crontab
fi
Nov 29, 2011
Thanks for this I'll do some tweaking... I'd really like to include auto update in the script without using cron
Dec 1, 2011
Another ideas: torrentexpander create a script to autoupdating himself; it run torrentexpander_update.sh and ends. torrentexpander_update.sh take some time to ping google (we could use to very connection aslo!) while main program ends. Then the update starts. if [[ $auto_update == "yes" && $is_outdated == "yes" ]]; then echo "#!/bin/sh ping -w 10 google.it; wget -o torrentexpander.sh http://torrentexpander.googlecode.com/svn/trunk/torrentexpander.sh chmod +x torrentexpander.sh " > torrentexpander_update.sh chmod +x torrentexpander_update.sh ./torrentexpander_update.sh fi
Dec 2, 2011
I had something similar in mind I'm pretty sure we can do this without creating a new script (on other platforms than the NMT, chmod +x may not work) We can use something like screen to launch a command in a parallel process. This update routine will be at the beginning of the script, right after torrentexpander knows what the torrent source and destination are. This command will start by a 1 second pause, torrentexpander will exit, torrentexpander will be rewritten with the latest version of the script, then be relaunched with the path to the source and destination. We'll use the settings to store current version of the script and the last updated at In order not to have to increment version number of the script, I'll also try to parse this page for the SVN revision number https://code.google.com/p/torrentexpander/source/browse/trunk Thanks
Dec 3, 2011
Current SVN release has auto update built-in Script will update daily, weekly, monthly or never, based on your settings. In the future I may need to add a branch to the project so that the trunk release is exempt of any bug
Dec 3, 2011
Thanks for this, but look issue 26
Dec 4, 2011
New SVN build I'm using a temp text file instead of a variable to store the new script My NMT fucks up right now so I can't test it Also, I added support for vi text editor, so you can directly edit your settings by using /path/to/torrentexpander.sh -c Let me know if it works for you
Dec 4, 2011
Excellent
Dec 4, 2011
(No comment was entered for this change.)
Status:
Fixed
|