From ba6d15a3f241318d9d2cd5f28e8f6d34f83dde60 Mon Sep 17 00:00:00 2001 From: Michael Jansen Date: Fri, 27 Jul 2018 08:52:55 -0400 Subject: [PATCH] use eval to allow quotes in the command --- template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template b/template index 57d3154..502d20c 100755 --- a/template +++ b/template @@ -34,9 +34,9 @@ case "$1" in echo "Starting $name" cd "$dir" if [ -z "$user" ]; then - sudo $cmd >> "$stdout_log" 2>> "$stderr_log" & + eval sudo $cmd >> "$stdout_log" 2>> "$stderr_log" & else - sudo -u "$user" $cmd >> "$stdout_log" 2>> "$stderr_log" & + eval sudo -u "$user" $cmd >> "$stdout_log" 2>> "$stderr_log" & fi echo $! > "$pid_file" if ! is_running; then