Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
I am trying to run one mono application as service. When I start from terminal
using the following method
service MyTestApp start
It strts as servive I can view its log porcess etc and prints
Starting MyTestApp
and wait the app in terminal not showing Started MyTestApp and I can possible to type next command only when I press Ctrl+C. How I can solve this
how to execute the next line after starting mono application in shell script.
my sample script is given below


case "$1" in

        echo "Starting $APP_NAME"
	mono MyTestApp.exe
 	echo "Started $APP_NAME"
    echo "Usage: /etc/init.d/$APP_NAME {start|stop}"
    exit 1
exit 0 
Posted 25-Jul-12 1:07am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I don't know about Mono, but in normal Linux/UNIX you would just put the program to run in the background by appending the & to the call thus:
	mono MyTestApp.exe &
However this may well mean that the mono process runs in the background but the other process does not. A few tests should tell you which.
Arun Kumar K S at 25-Jul-12 9:20am
is this execute this line echo "Started $APP_NAME"
Richard MacCutchan at 25-Jul-12 10:26am
I assume so, what happens when you try it?
Arun Kumar K S at 26-Jul-12 22:39pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 205
1 Sergey Alexandrovich Kryukov 165
2 jlopez788 109
3 Rob Philpott 100
4 Prakriti Goyal 97
0 OriginalGriff 6,837
1 Sergey Alexandrovich Kryukov 5,589
2 Maciej Los 3,479
3 Peter Leow 3,323
4 DamithSL 2,505

Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 25 Jul 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100