diff --git a/pscheduler-server/pscheduler-server/database/Makefile b/pscheduler-server/pscheduler-server/database/Makefile index 0f32aed1e..87f218563 100644 --- a/pscheduler-server/pscheduler-server/database/Makefile +++ b/pscheduler-server/pscheduler-server/database/Makefile @@ -65,11 +65,11 @@ SQL=$(BUILD_SUPER_SQL) $(BUILD_SQL) $(TEARDOWN_SQL) INTERNALS=\ db-connections \ db-change-password \ + db-reset \ db-update \ key \ purge-runs \ psql \ - reset \ warmboot diff --git a/pscheduler-server/pscheduler-server/database/reset.raw b/pscheduler-server/pscheduler-server/database/db-reset.raw similarity index 100% rename from pscheduler-server/pscheduler-server/database/reset.raw rename to pscheduler-server/pscheduler-server/database/db-reset.raw diff --git a/pscheduler-server/pscheduler-server/utilities/Makefile b/pscheduler-server/pscheduler-server/utilities/Makefile index 689944d70..057b60f40 100644 --- a/pscheduler-server/pscheduler-server/utilities/Makefile +++ b/pscheduler-server/pscheduler-server/utilities/Makefile @@ -13,6 +13,7 @@ COMMANDS=\ validate-configurables INTERNALS=\ + reset \ service default: build diff --git a/pscheduler-server/pscheduler-server/utilities/reset.raw b/pscheduler-server/pscheduler-server/utilities/reset.raw new file mode 100644 index 000000000..883284c79 --- /dev/null +++ b/pscheduler-server/pscheduler-server/utilities/reset.raw @@ -0,0 +1,49 @@ +#!/bin/sh +# +# Do a full reset on pScheduler +# + +if [ "$(id -u)" != "0" ] +then + echo "This must be done as root." 1>&2 + exit 1 +fi + +INTERACTIVE=false + +if [ -t 0 -a -t 1 -a -t 2 ] +then + INTERACTIVE=true + cat <