Auto-restart application win32

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Smashden
Level 2
Level 2
Posts: 10
Joined: Thu Dec 25, 2014 7:14 am

Auto-restart application win32

Post by Smashden »

Hello, I searching on interned how to do this, I tried cron but this not wokring :(
I have to manually perform these tasks:
cd /home && screen wine serv.exe
renice -20 -p [PID]

How to do as in sh script to check whether serv.exe is on and when it turns off run it and set renice then in crontab I only add somethink like this
10,20,30,40,50,59 1-23 * * * root /home/script.sh

I almost forgot, I'm using debian.
Smashden
Level 2
Level 2
Posts: 10
Joined: Thu Dec 25, 2014 7:14 am

Re: Auto-restart application win32

Post by Smashden »

refresh
spoon0042
Level 6
Level 6
Posts: 572
Joined: Thu Dec 24, 2009 11:00 am

Re: Auto-restart application win32

Post by spoon0042 »

kind of offtopic but you're probably looking for something like pgrep.

if [ `pgrep serv.exe` ] ; then
etc
Smashden
Level 2
Level 2
Posts: 10
Joined: Thu Dec 25, 2014 7:14 am

Re: Auto-restart application win32

Post by Smashden »

I am amatour in using linux, I need script sh :(
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: Auto-restart application win32

Post by dimesio »

Take a look at this thread: viewtopic.php?f=8&t=23718.
Locked