Commit 3abe4854 authored by Bob Mottram's avatar Bob Mottram

Send stdout to log

parent 51028742
......@@ -147,6 +147,9 @@ function create_web_page {
else
echo $'There are no build results yet' > "${web_dir}/build_${test_dir}.txt"
fi
if [ -f "/etc/${APP_NAME}/${test_dir}_build.log" ]; then
cp "/etc/${APP_NAME}/${test_dir}_build.log" "${web_dir}/build_${test_dir}.txt"
fi
# Add an entry to the html table
echo "<tr><th><img src=\"${APP_NAME}_img/${status}.png\" width=\"64\" alt=\"${status}\"/></th><th><a href=\"build_${test_dir}.txt\">$test_dir</a></th><th><font color=\"${text_color}\">$CURR_COMMIT</font>${last_good_commit_str}</th><th><font color=\"$text_color\">${end_date}</font></th></tr>" >> "$filename"
......@@ -378,6 +381,12 @@ if [ "$REMOVE_DAEMON" ]; then
rm "/etc/systemd/system/${REMOVE_DAEMON}.service"
rm "/etc/systemd/system/${REMOVE_DAEMON}.timer"
rm -rf "/etc/${APP_NAME:?}/$REMOVE_DAEMON"
if [ -d "/etc/${APP_NAME}/${REMOVE_DAEMON}-build" ]; then
rm -rf "/etc/${APP_NAME}/${REMOVE_DAEMON}-build"
fi
if [ -f "/etc/${APP_NAME}/${REMOVE_DAEMON}_build.log" ]; then
rm "/etc/${APP_NAME}/${REMOVE_DAEMON}_build.log"
fi
fi
exit 0
fi
......@@ -458,6 +467,8 @@ if [ "$DAEMON" ]; then
echo "WorkingDirectory=/etc/${APP_NAME}";
echo "ExecStart=/usr/local/bin/${APP_NAME} -d \"$BUILD_DIR\" -r \"$REPO\" -b \"$BRANCH\" -s \"$BUILD_SCRIPT\" -w \"$WEB_FILE\" -x \"$XMPP_ADDRESS\"";
echo 'StandardInput=tty';
echo "StandardOutput=/etc/${APP_NAME}/${DAEMON}_build.log";
echo "StandardError=/etc/${APP_NAME}/${DAEMON}_build.log";
echo 'TTYPath=/dev/tty6';
echo 'TTYReset=yes';
echo 'TTYVHangup=yes';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment