Shell script for closing and starting Evolution Mail?
Hello,
I've been looking for shell script that closes Evolution and eventually starts it again so I can clear the e-mails in custom made folder with a crontab command. But i can't quite find one, neither that i have an idea how to make one. I'm new to Ubuntu. Or if they're is a better way to do this then i'm pleased to hear it. Thanks, Pommeldier. |
Try using pkill(1).
One of the most common script types to use is bash. Here are some references to get you going: http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html http://tldp.org/LDP/abs/html/ http://floppix.ccai.com/scripts1.html The simplest script here would be: Code:
#!/bin/bash |
Quote:
Quote:
|
Quote:
Quote:
|
Quote:
Quote:
|
Quote:
|
I don't like guessing but I'd say it's like a "virtual folder" (as in http://library.gnome.org/users/evolu...olders.html.en), and editing the search conditions should update its contents (or see if Ctrl+E works). Else, like I said before, it may be something for the developers to look into. Check http://bugzilla.gnome.org/ for related open tickets and workarounds and else create your own suggestion or bug report?
|
I guess it is a virtual folder. But anyway. I solved the half of my problem. I made 3 different bash scripts with one that kills, clears and starts.
But now i clear the mbox file of the subfolder and it shows 0 bytes. But in the folder when i start evolution. The mails are not gone. Any idea how i could delete them? |
You risk serious mail corruption by aborting evolution with a -9. It could be in the middle of updating an index and killing that could leave the index in an unknown state.
|
I have been doing the following in my backup script.
Code:
echo Evolution Backup Started `date` >> $RajHome/backup.log - Raj |
I solved it my problem with this:
pkill Evolution 03 * * * * > /blablabla/thefile evolution & I used a different Bash script for every single line. Because for some reason it doesn't work if i put it in a single script. And i added the 3 scripts to crontab. |
pkill is not necessarily a graceful shutdown. could be, if it is caught and appropriately handled.
|
Like I hinted at already in post #3 Evolution itself has a switch to force closing it down. Such a switch would not exist if the developers meant it in the Sledge Hammer "Trust me, I know what I'm doing." kind of way.
|
All times are GMT -5. The time now is 05:29 AM. |