Skip to content
Snippets Groups Projects
Commit 4efcb5cb authored by Bob Mottram's avatar Bob Mottram
Browse files

Remove active builds

parent 69f2edb5
No related branches found
No related tags found
No related merge requests found
......@@ -90,6 +90,8 @@ if [ ! "$1" ]; then
fi
if [[ "$1" == 'remove'* ]]; then
sed -i '/birbci-cron/d' /etc/crontab
arch=$(uname -a)
if [[ "$arch" == *'x86'* || "$arch" == *'amd64'* ]]; then
remove_ci_daemon amd64
......@@ -108,6 +110,15 @@ if [[ "$1" == 'remove'* ]]; then
remove_ci_daemon beagleboneblack mesh
remove_ci_daemon cubietruck
remove_ci_daemon cubietruck onion
# shellcheck disable=SC2009
active_builds=$(ps aux | grep "birbci -d" | grep -vc "grep")
# shellcheck disable=SC2086
if [ $active_builds -gt 0 ]; then
kill_pid=$(pgrep "birbci -d" | head -n 1)
kill -9 "$kill_pid"
fi
rm -rf /root/.tmp_${PROJECT_NAME}_build*
rm -rf /etc/birbci/*
exit 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment