Skip to content

Instantly share code, notes, and snippets.

@gtzilla
Created September 4, 2010 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gtzilla/565441 to your computer and use it in GitHub Desktop.
Save gtzilla/565441 to your computer and use it in GitHub Desktop.
starting simplequeue on user specified port and IP
# sample for 127.0.0.1:4414
simplequeue -p 4414 -a 127.0.0.1
The actual code for command line args to simplequeue:
address = "0.0.0.0";
port = 8080;
opterr = 0;
while ((ch = getopt(argc, argv, "a:p:d:D:r:u:g:")) != -1) {
switch (ch) {
case 'a':
address = optarg;
break;
case 'p':
port = atoi(optarg);
break;
case 'd':
debug = 1;
break;
case 'r':
root = optarg;
break;
case 'D':
daemon = 1;
break;
case 'g':
garg = optarg;
break;
case 'u':
uarg = optarg;
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment