Notices


Reply
Thread Tools
Posts: 235 | Thanked: 89 times | Joined on Oct 2009 @ italy
#371
Originally Posted by shapeshifter View Post
Have you set
Code:
chmod +x /home/user/delete_syslog_script.sh
to make it runnable?
yes, I did
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
__________________
If you found my post useful please thank me, I appreciate!
 
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#372
Originally Posted by shapeshifter View Post
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
 

The Following User Says Thank You to nicolai For This Useful Post:
Posts: 539 | Thanked: 165 times | Joined on Feb 2010 @ Berlin, Germany
#373
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.
 
Posts: 235 | Thanked: 89 times | Joined on Oct 2009 @ italy
#374
Originally Posted by x-lette View Post
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 ). 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!!
__________________
If you found my post useful please thank me, I appreciate!
 
Posts: 235 | Thanked: 89 times | Joined on Oct 2009 @ italy
#375
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?
__________________
If you found my post useful please thank me, I appreciate!
 
Posts: 235 | Thanked: 89 times | Joined on Oct 2009 @ italy
#376
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?
__________________
If you found my post useful please thank me, I appreciate!

Last edited by maemo.it; 2010-12-23 at 21:41.
 
Posts: 123 | Thanked: 99 times | Joined on Sep 2010 @ Russia
#377
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.
 

The Following 3 Users Say Thank You to ForeverYoung For This Useful Post:
Posts: 123 | Thanked: 99 times | Joined on Sep 2010 @ Russia
#378
Originally Posted by Cavemud View Post
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.
 
Posts: 187 | Thanked: 345 times | Joined on Nov 2009
#379
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.
__________________
Author of:
  • The "Alarmed" scheduling and automation app. (Supports alarms, switching profiles, resetting the GPRS counter, setting custom commands to go off, cron syntax and much more. GUI and CLI).
  • "Reaction face-off", a two-player puzzle/knowledge/reaction game.
  • "ytcli", a simple but effective command line youtube client which allows you to play videos from the CLI instantly or download videos on a queue.
 

The Following User Says Thank You to shapeshifter For This Useful Post:
Posts: 435 | Thanked: 769 times | Joined on Apr 2010
#380
Originally Posted by maemo.it View Post
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
 
Reply


 
Forum Jump


All times are GMT. The time now is 00:57.