Running bash script in upstart .conf script
Running a command via exec
with arguments is fine - see http://upstart.ubuntu.com/wiki/Stanzas#exec which gives such an example.
However, upstart will use /bin/sh
not bash
, so if your script needs bash you'd need something like
script exec bash -c '/etc/kvm_manage start'end script
Update: See also the suggestion in the comments from Guss to use the exec
stanza instead for simple cases:
exec bash -c '/etc/kvm_manage start'
Or if kvm_manage
is an executable with a she-bang (#!/bin/bash
), then simply:
exec /etc/kvm_manage start