util/startup.lua
changeset 11851 2b3ce80ffece
parent 11850 6425dfa3de45
child 11870 515a89dee6ae
equal deleted inserted replaced
11850:6425dfa3de45 11851:2b3ce80ffece
    36 function startup.parse_args()
    36 function startup.parse_args()
    37 	local opts, err, where = parse_args(arg, arg_settigs[prosody.process_type]);
    37 	local opts, err, where = parse_args(arg, arg_settigs[prosody.process_type]);
    38 	if not opts then
    38 	if not opts then
    39 		if err == "param-not-found" then
    39 		if err == "param-not-found" then
    40 			print("Unknown command-line option: "..tostring(where));
    40 			print("Unknown command-line option: "..tostring(where));
    41 			print("Perhaps you meant to use prosodyctl instead?");
    41 			if prosody.process_type == "prosody" then
       
    42 				print("Perhaps you meant to use prosodyctl instead?");
       
    43 			end
    42 		elseif err == "missing-value" then
    44 		elseif err == "missing-value" then
    43 			print("Expected a value to follow command-line option: "..where);
    45 			print("Expected a value to follow command-line option: "..where);
    44 		end
    46 		end
    45 		os.exit(1);
    47 		os.exit(1);
    46 	end
    48 	end