Originally created by: Andrej.S... (code.google.com)@gmail.com
What steps will reproduce the problem?
1. FW version SNAKE OS V1.3.2 (20111019)
2. Transmission: transmission-2.73-1.opk
3. Set "Restart every 12 hours:" checkbox on Services\transmission screen of Snake-OS's administrative WEB UI.
4. Observe problem:
4.1. Go to transmission WEB UI and wait at least 1 minute -> connection lost dialog appears every 1 minute
4.2. Return to Snake-OS's administrative WEB UI and visit System\Log screen: browsing for "crond" messages like
... 12:59:01 crond[...]: crond: USER root pid ... cmd sh /opt/etc/init.d/transmission restart
...
... 12:59:02 crond[...]: crond: USER root pid ... cmd sh /opt/etc/init.d/transmission restart
What is the expected output? What do you see instead?
/transmission restart should appear every 12 hours.
What version of the product are you using? On what operating system?
FW version SNAKE OS V1.3.2 (20111019)
Transmission: transmission-2.73-1.opk
Please provide any additional information below.
DS: crond job incorrectly configured by transmission.
EXPL: unpack transmission-2.73-1.opk and examine function update_cronjob() of data.tar/etc/init.d/transmission: first asterisk of crontab's config file means ANY minute of period.
RCPT: do not use "Restart every 12 hours:" option of transmission-2.73-1.opk
SUGGESTION:
if You need to "Restart every 12 hours:" then:
Do not forget to uncheck the "Restart every 12 hours:" first.
Than apply ONE of:
A. (every time (!) after (re)installation of transmission-2.73-1.opk)
fix /opt/etc/init.d/transmission functions update_cronjob() and remove_cronjob() respectively:
(beware of extra line-feeds)
search for:
remove_cronjob() {
sed -i /"\* \*\/12 \* \* \* sh \/opt\/etc\/init.d\/transmission restart"/d /etc/cron.d/root /etc/cron.d/root
}
replace with:
remove_cronjob() {
sed -i /"0 \*\/12 \* \* \* sh \/opt\/etc\/init.d\/transmission restart"/d /etc/cron.d/root /etc/cron.d/root
}
search for:
update_cronjob() {
remove_cronjob
echo "* */12 * * * sh /opt/etc/init.d/transmission restart" >> /etc/cron.d/root
}
replace with:
update_cronjob() {
remove_cronjob
echo "0 */12 * * * sh /opt/etc/init.d/transmission restart" >> /etc/cron.d/root
}
B. preferred solution for advanced users:
- unpack transmission-2.73-1.opk
- unpack data.tar
- apply above replacements to etc/init.d/transmission
- repack to new data.tar than - transmission-2.73-xx.opk
- install custom transmission-2.73-xx.opk with opkg
Now You can use "Restart every 12 hours:".
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: stefansc...@googlemail.com
Whoops.. thanks. I should test this better.
Maybe this would be even more appropriate (without the minutes).
remove_cronjob() {
sed -i /" \*\/12 \* \* \* sh \/opt\/etc\/init.d\/transmission restart"/d /etc/cron.d/root /etc/cron.d/root
}
Otherwise it would not remove the faulty cronjob if it somehow got saved permanently.
I'll put up a new package soonish. There's a new version of transmission out anyway.
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: Andrej.S... (code.google.com)@gmail.com
Appreciate the wisdom.
I removed wrong job manually than inserted 'Do not forget to uncheck the "Restart every 12 hours:" first.' into my SUGGESTION. But your solution is better.
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: stefansc...@googlemail.com
New package up:
https://code.google.com/p/snake-os/downloads/detail?name=transmission-2.76-1.opk