X-Git-Url: https://git.tld-linux.org/?p=TLD.git;a=blobdiff_plain;f=pld-builder.new%2Fadmin%2Ffresh-queue.sh;fp=pld-builder.new%2Fadmin%2Ffresh-queue.sh;h=5d80086a38e873d4df4d5b06662b1af506ba2524;hp=0000000000000000000000000000000000000000;hb=90809c8fec988489786ce00247d9a4150070748b;hpb=ab3934fab858112cd552359b18cb980ea07c310b
diff --git a/pld-builder.new/admin/fresh-queue.sh b/pld-builder.new/admin/fresh-queue.sh
new file mode 100755
index 0000000..5d80086
--- /dev/null
+++ b/pld-builder.new/admin/fresh-queue.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+umask 077
+
+CONFIG=$HOME/.pldbuilderrc
+[ -f "$CONFIG" ] && . $CONFIG
+[ -n "$BUILDERPATH" ] || BUILDERPATH="$HOME/pld-builder.new/"
+export BUILDERPATH
+
+if [ -d "$BUILDERPATH" ]; then
+ cd "$BUILDERPATH"
+else
+ echo "the $BUILDERPATH directory does not exist"
+ exit 1
+fi
+
+
+if [ -f "$BUILDERPATH/config/global" ]; then
+ . $BUILDERPATH/config/global
+fi
+
+if [ "$1" != "y" ] ; then
+ echo "this scripts kills current queue and installs new"
+ echo "run '$0 y' to run it"
+ exit 1
+fi
+
+mkdir -p spool/{builds,buildlogs,notify,ftp} www/srpms lock
+echo 0 > www/max_req_no
+echo 0 > spool/last_req_no
+echo -n > spool/processed_ids
+echo -n > spool/got_lock
+echo '' > spool/queue
+echo '' > spool/req_queue
+test ! -z "$binary_builders" && for bb in $binary_builders; do
+ echo '' > spool/queue-$bb
+done
+
+chmod 755 www www/srpms
+chmod 644 www/max_req_no