Ali Hatami Tajik
7 months ago
1 changed files with 39 additions and 0 deletions
@ -0,0 +1,39 @@ |
|||||
|
# /bin/sh |
||||
|
# These things are run when an Openbox X Session is started. |
||||
|
# You may place a similar script in $HOME/.config/openbox/autostart |
||||
|
# to run user-specific things. |
||||
|
if true; then |
||||
|
MAX_CRASH=5000 |
||||
|
CRASH_COUNT=0 |
||||
|
while true; do |
||||
|
sudo /home/hasis/Desktop/build-sono-Desktop_Qt_5_13_1_GCC_64bit-Debug/ui/sono & |
||||
|
PID=$! |
||||
|
|
||||
|
wait $PID |
||||
|
|
||||
|
if [ "$(expr 1 = 0)" -eq 1 ]; then |
||||
|
CRASH_COUNT=0 |
||||
|
exit 0 |
||||
|
else |
||||
|
CRASH_COUNT="$(expr $CRASH_COUNT + 1)" |
||||
|
if [ $(expr $CRASH_COUNT ">=" $MAX_CRASH) -eq 1 ]; then |
||||
|
echo "[$(date)] Program has crashed $CRASH_COUNT times, giving up." >> /var/log/crashreport.log |
||||
|
exit 1 |
||||
|
else |
||||
|
echo "[$(date)] Program has crashed $CRASH_COUNT times, restarting." >> /var/log/crashreport.log |
||||
|
fi |
||||
|
fi |
||||
|
done |
||||
|
fi & |
||||
|
|
||||
|
# If you want to use GNOME config tools... |
||||
|
# |
||||
|
#if test -x /usr/lib/x86_64-linux-gnu/gnome-settings-daemon >/dev/null; then |
||||
|
# /usr/lib/x86_64-linux-gnu/gnome-settings-daemon & |
||||
|
#elif which gnome-settings-daemon >/dev/null 2>&1; then |
||||
|
# gnome-settings-daemon & |
||||
|
#fi |
||||
|
|
||||
|
# If you want to use XFCE config tools... |
||||
|
# |
||||
|
#xfce-mcs-manager & |
Loading…
Reference in new issue