I'm probably doing something remarkably stupid, but I can't figure out what.

Running Ubuntu Server 12.04 on a cloud host (Digital Ocean, if it matters). All shell scripts do absolutely nothing and just return immediately to the prompt, without error, warning or even a wag of the middle finger.

  • start-stop-daemons scripts will not run from command line with "./script-name", not just cron

  • execute bit is set

  • shell is /bin/bash

  • user is root

  • tried changing #!/bin/sh to #!/bin/bash

  • tried not using dash by dpkg-reconfigure dash

  • scripts are being parsed -- if I edit it to something illegal, I get errors

Running out of ideas...

Is there some reason I just wouldn't be seeing the output?

  • 1
    Can you execute strace -f, its output might be useful.
    – Thor
    Sep 7, 2012 at 17:25

1 Answer 1


Try to debug the shell script, here is how

Put that after the #!/bin/bash line

exec > $logfile 2>&1

then execute the script with this command from shell prompt.

# bash -x script-name.sh 

See what happens next, check to see if the commands written in script are getting executed.

Also double check the path using this commnad.

echo $PATH
  • Thank you! That did it. My binaries had somehow migrated from /usr/local/bin to /usr/bin and all the scripts just happened to be failing without warning.
    – Greg
    Sep 7, 2012 at 17:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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