Click here to Skip to main content
12,746,668 members (30,055 online)
Rate this:
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 2: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 25-Jul-12 9:20am
is this execute this line echo "Started $APP_NAME"
Richard MacCutchan 25-Jul-12 10:26am
I assume so, what happens when you try it?
Arun Kumar K S 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170215.1 | Last Updated 25 Jul 2012
Copyright © CodeProject, 1999-2017
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