2 Commits 803518e37e ... f844431d3d

Autor SHA1 Mensagem Data
  Samuel W. Flint f844431d3d Update run script 9 meses atrás
  Samuel W. Flint 9f2935d031 Add some more error checking 9 meses atrás
1 arquivos alterados com 6 adições e 1 exclusões
  1. 6 1
      background-job

+ 6 - 1
background-job

@@ -37,6 +37,11 @@ if [ -z "${NAME}" ] ; then
     exit 1
 fi
 
+if [ $# -lt 1 ] ; then
+    echo "A command is required." >&2
+    exit 1
+fi
+
 RUN_SCRIPT=$(mktemp)
 
 cat <<EOF > "${RUN_SCRIPT}"
@@ -99,8 +104,8 @@ cat <<EOF >> "${RUN_SCRIPT}"
 rm "\${OUTPUT_FILE}"
 rm "\${TIME_FILE}"
 rm "\${FN}"
-
 EOF
 
+chmod +x ${RUN_SCRIPT}
 screen -d -S ${NAME} -m ${RUN_SCRIPT}