Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

Screen and dtach sessions show as main in process manager
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Screen and dtach sessions show as main in process manager
10th Jun, 2014, 05:47 PM
Post: #9
CurlyMo Offline
Registered
Posts: 3,501
Joined: Dec 2012
Reputation: 202
RE: Screen and dtach sessions show as main in process manager
If you'd actually tried my suggestion, you would have noticed that it was the right way to go Confused It doesn't matter to upstart if something daemonizes or not, as long as you configure your upstart script correctly.

Proof of concept
Code:
cat <<\EOF > /root/test.sh
#!/bin/bash

while [ 1 ]; do
        sleep 1;
done;
EOF
chmod +x test.sh
cat <<\EOF > /etc/init/test.conf
#!upstart

description "start test"

start on started mountall and net-device-up
stop on runlevel [016]

exec /root/test.sh
EOF
initctl reload-configuration

Just copy and paste everything between the code tags at once in your terminal. Then try:
Code:
service test start
service test stop

However, if you do this in your upstart script
Code:
exec /root/test.sh &
You also need to add:
Code:
expect fork

pilight - modular domotica solution
Visit this user's website Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Messages In This Thread
Screen and dtach sessions show as main in process manager - koper89 - 9th Jun, 2014, 06:56 AM
RE: Screen and dtach sessions show as main in process manager - CurlyMo - 9th Jun, 2014, 07:10 AM
RE: Screen and dtach sessions show as main in process manager - koper89 - 9th Jun, 2014, 07:15 AM
RE: Screen and dtach sessions show as main in process manager - koper89 - 9th Jun, 2014, 07:57 PM
RE: Screen and dtach sessions show as main in process manager - belese - 10th Jun, 2014, 05:25 AM
RE: Screen and dtach sessions show as main in process manager - koper89 - 10th Jun, 2014, 07:23 AM
RE: Screen and dtach sessions show as main in process manager - CurlyMo - 10th Jun, 2014, 07:25 AM
RE: Screen and dtach sessions show as main in process manager - koper89 - 10th Jun, 2014, 08:05 AM
RE: Screen and dtach sessions show as main in process manager - CurlyMo - 10th Jun, 2014 05:47 PM
RE: Screen and dtach sessions show as main in process manager - koper89 - 10th Jun, 2014, 06:36 PM

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 4th Jun, 2025, 03:26 AM Powered By MyBB, © 2002-2025 MyBB Group.