maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting) (https://talk.maemo.org/showthread.php?t=46594)

maemo.it 2010-12-22 10:54

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
Quote:

Originally Posted by shapeshifter (Post 901937)
Have you set
Code:

chmod +x /home/user/delete_syslog_script.sh
to make it runnable?

yes, I did :(
Quote:

Also, I'm unsure if it's a good idea to use the /bin/sh shebang. Afaik, you should be using /bin/bash and let maemo's symlink to ash work.
why bash is better than sh?
I should change my script in:
Code:

#!/bin/bash
yes pipe (sorry, I'm using opera browse and I can't use pipe symbol) rm /var/log/syslog

right?
anyway, thak you for your reply shapeshifter :)

nicolai 2010-12-22 11:30

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
Quote:

Originally Posted by shapeshifter (Post 901937)
Have you set
Code:

chmod +x /home/user/delete_syslog_script.sh
to make it runnable? Also, I'm unsure if it's a good idea to use the /bin/sh shebang. Afaik, you should be using /bin/bash and let maemo's symlink to ash work.

why bash? it isn't installed on th device by default.
I think /bin/sh is the better way.
nicolai

x-lette 2010-12-22 20:47

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
Deleting syslog's logfile without doing a reload of syslog daemon is no good idea because the file is still opened by the daemon. You can either rename the file and then force a reload of syslog or you stop syslog, delete the file and start it again.
Another way of preventing root partition from getting filled would be to put logfile to another partition. you can edit /etc/syslog.conf and change path to logfiles. But you should not put it to MyDocs as this may prevent partition from being unmounted and used via usb.

maemo.it 2010-12-22 21:08

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
Quote:

Originally Posted by x-lette (Post 902317)
Deleting syslog's logfile without doing a reload of syslog daemon is no good idea because the file is still opened by the daemon. You can either rename the file and then force a reload of syslog or you stop syslog, delete the file and start it again.
Another way of preventing root partition from getting filled would be to put logfile to another partition. you can edit /etc/syslog.conf and change path to logfiles. But you should not put it to MyDocs as this may prevent partition from being unmounted and used via usb.

Thank you for your advice ;)
I just tought this possibility but I prefer delete syslog everyday. I'm interested to read it just in case of problem (fortunately not everyday :D). I noticed that if I delete it I've to recreate a new one or wait till next reboot of device otherwise I loose it. In this case I should delete the file and create a new or just delete inside syslog remaining the file.
But main problem remain, my script should delete it at prefixed hour:min everyday by alarmed but...nothing happens. syslog still there!! :(

maemo.it 2010-12-23 19:45

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
I did a test:
Code:

$ touch test1
touch test2
chmod +x test1 test2
vi test1

       
Code:

       
#!/bin/sh
rm /home/user/temp2
~
~



set in alarmed: 'sh /home/user/test2' at specified time.
It's worked!!
so, at this point, I suppose problem is with root privileges...
now, if following this: http://talk.maemo.org/showpost.php?p...&postcount=278 doesn't work, what is right way to execute command on root files?

maemo.it 2010-12-23 21:32

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
ok, I'm sure now problem is executing commands needs root.
I modified my script:
Code:

cat /dev/null > /var/log/syslog
in this case I empty syslog file without delete it.
It's works by terminal but doesn't in alarmed.
any idea?
maybe this problem is related to sudoers?
:confused:

ForeverYoung 2010-12-29 05:41

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
My little patch:
http://pastebin.com/BKxGY6u7

DONE:
- Non-english profiles/names of events, etc.
- Removed tweakr profiles, because of ProfileX

TODO:
- Button captions in alarm (add attr text-domain, https://bugs.maemo.org/show_bug.cgi?id=11729
- Weekly, once alarms to standard alarm list
- GUI, I delete event, it remains in list.

ForeverYoung 2010-12-29 06:31

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
Quote:

Originally Posted by Cavemud (Post 694876)
I'm particularly interested to know if the program could be used to start and stop GPodder.....can anybody help me with this?

GPodder will automatically search for and download any podcasts that I'm subscribed to, but only when GPodder is running. If I could get alarmed to open GPodder, say once a week, in the middle of the night, then all of my podcasts could be downloaded without interupting anything else that I'm doing and whilst the phone is in the house and accessing WLAN.

gpo update && gpo download

gPodder version 2.11. cli started to work since 2.9 version, if I'm not mistaken.

shapeshifter 2010-12-29 16:36

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
Everyone, thanks, especially to those submitting patches.

Unfortunately I'm very busy atm so I can't do any work on Alarmed. I hope to get some room in a few weeks and if I can I'll include the patches and implement some of the requested features. Until then, development is stalled.

gionni88 2010-12-29 18:10

Re: [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)
 
Quote:

Originally Posted by maemo.it (Post 901606)
hi guys, I need an help:
I installed syslog app to monitor my system. problem is that I need to delete /var/log/syslog file periodically otherwise my rootfs partition become full and I've to reflash it.

Try this command:

Code:

echo 'rm /var/log/syslog' | root


All times are GMT. The time now is 07:29.

vBulletin® Version 3.8.8