![]() |
[SCRIPT] Restart wazapp automatically upon crash!
Hi,
I suffer from alot of random Wazapp crashes due to either signal loss or just PSM interfering. For the moment I came up with a solution to missing messages due to a crash. I want to make a script and then have it run every 30 mins or so to check if Wazapp is running and if it isn't restart it. Here is what I have so far but there are errors I can't seem to solve, hoping you guys can help correct this :) EDIT: This is the latest version that works! Code:
#!/bin/sh http://www.savelono.com/linux/bash-a...s-running.html |
Re: [SCRIPT HELP] Process is running or not
Newer Version of the script
Code:
#!/bin/sh |
Re: [SCRIPT HELP] Process is running or not
SOLVED! :D
Big Thanks to ZogG and Doc_Scrutinizer |
Re: [SCRIPT HELP] Process is running or not
Edit the title name to "[SOLVED][SCRIPT HELP] Process is running or not" or whatever. :)
|
Re: [SCRIPT] Process is running or not
End result script works great here are the two scripts created from this idea! :)
INSTRUCTIONS! Connect your N9 to your computer via USB and copy the waxmppplugin.desktop and wazapp.sh file onto your Device. Now unplug the USB and open the Terminal, and type in the following. If any commands give a permissions error, try again as root. Code:
cp /home/user/MyDocs/wazapp.sh /home/user/ Wazapp.sh Original Wazapp.desktop If script 2 is place in /home/user/ and saved as wazapp.sh then using this .desktop file to replace the default one for Wazapp, you can achieve a Wazapp that will restart itself if it errors for any reason :) If you Quit the app yourself, it will not restart until you do it manually :) Scipt 1 (ZogG) Script 2 (Doc_Scrutinizer) |
Re: [SCRIPT] Process is running or not
Quote:
|
Re: [SCRIPT] Restart wazapp automatically upon crash!
ok i used only script 2 and the new desktop file but wazapp wont load, any clue?
|
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
and put the .desktop file in /usr/share/applications/ |
Re: [SCRIPT] Process is running or not
Quote:
Fixed now |
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
|
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
chmod +x foo-bar.sh |
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
|
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
|
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
|
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
do the following command in terminal :) Code:
chmod +x /home/user/wazapp.sh Fixed this in the original post ZogG beat me to it :p |
Re: [SCRIPT] Restart wazapp automatically upon crash!
Code:
devel-su |
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
|
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
than what does this command shows? lsof |grep 'wazapp.sh' |
Re: [SCRIPT] Restart wazapp automatically upon crash!
I hope you've suggested this for wazapp's upcoming version !!! Don't wanna mess up with terminal so just hope to see this addition with the public release of the next version !!!
|
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
|
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
|
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
|
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
Also are you able to start wazapp by typing this as a NON ROOT user into terminal Code:
/opt/waxmppplugin/bin/wazapp/wazapp |
Re: [SCRIPT] Restart wazapp automatically upon crash!
yes, the file is in there and i can open wazzap using terminal.
|
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
Code:
cd /home/user/ Let me know the outcome. |
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
|
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
|
Re: [SCRIPT] Restart wazapp automatically upon crash!
please check you desktop file i think this is the problem :/
|
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
By opening terminal and typing Code:
cd /home/user/ |
Re: [SCRIPT] Restart wazapp automatically upon crash!
Yes, it can start by running the script in terminal but not by tapping the custom desktop file
|
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
Code:
devel-su If you recieve permission errors then try the commands that errored as a normal NON ROOT user. |
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
chmod +x "/path/to/script.sh" && /path/to/./script.sh |
Re: [SCRIPT] Restart wazapp automatically upon crash!
I have updated the instructions in the initial post, please follow the new instructions:
http://talk.maemo.org/showpost.php?p...66&postcount=5 |
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
The code can be input as non-root except the last line |
Re: [SCRIPT] Process is running or not
Quote:
Have to try as non-root, if it works keep going till you find a problem. After that try as root. |
Re: [SCRIPT] Restart wazapp automatically upon crash!
I wonder if it is possible to run the script using the default .desktop file?
|
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
Hope that helps :) Quote:
Thats why it has the same name and icon and everything else :) |
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
|
Re: [SCRIPT] Restart wazapp automatically upon crash!
Quote:
Tbh the splashscreen stays on for too long sometimes and its not really a useful feature to me :P |
Re: [SCRIPT] Restart wazapp automatically upon crash!
@GOW424
Just a feedback: I think most of the crashes on Wazapp that Im using is/was caused by switching of connections from Wifi to 3g and vice versa. Some of this crashes, the UI just hanged without any activity. I tried the script and experienced while it tried to reconnect the hanged Wazapp, it comes to a loop of 'connecting', 'online', 'offline'. Is there anyway to make the script to completely shutdown the app before restart and connect? BTW, I'm using the dev version. I've able to avoid the hanged Wazapp crash by staying on 3g all the time and completely disabling Wifi connection for it. |
All times are GMT. The time now is 23:34. |
vBulletin® Version 3.8.8