0

I'm trying to automatize my system, actually using CentOS 7.

Every time I restart the machine I need to do:

screen -S bun

then on that screen I use:

/home/suite/bun/bun.sh

Nice until that.
Sometimes I need to stop that script.
Using SSH Secure Shell Client I press Control + Z for stop that script, fix something and start again.

The problem is here:
I did notice I can do:

screen -dmS bun/home/suite/bun/bun.sh

Which is wonderfull, but when I need to fix something I cant stop the script using Control + Z it just show ^Z but the script still running.

Is there a way that can I stop the script?

0

You're starting screen in detached mode. i.e. it runs in the background, not attached to the current terminal.

If you need to interact with anything running in that screen session, you have to attach to it first. For example:

screen -D -RR bun

You should then be able to suspend your bun.sh script with ^Z

  • It doesnt work for me bud – Martini002 Oct 5 '15 at 6:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.