/* Restart the PowerWeb Server */

parse arg quick admin_user admin_password

if quick = "?" | quick = "/?" then do
	say "Utility to Restart the PowerWeb Server++"
	say ""
	say "Usage:     Restart [quick [AdminName [AdminPassword]]]"
	say ""
	say "Example 1: Restart"
	say "Example 2: Restart quick admin secret"
	say ""
	say "If the quick flag is omitted, it defaults to 'quick'."
	say "If the admin user name is omitted, it defaults to 'admin'."
	say "If the admin user password is omitted, it defaults to empty."
	return
end

if length(admin_user) = 0 then
	admin_user = 'admin'

if length(quick) = 0 | translate(quick) = 'QUICK' | translate(quick) = 'Q' then
	http = '/!server?file=&submit=Quick%%20Restart'
else
	http = '/!server?file=&submit=Complete%%20Restart'

call CallHTTP http, admin_user, admin_password, "Configuration Management", "Copyright"

return

