mirror of
https://github.com/SuperBFG7/ympd
synced 2024-11-29 16:09:55 +00:00
Add option to set MPD password
This commit is contained in:
parent
ec008a4995
commit
f79dea44a2
@ -87,10 +87,11 @@ int main(int argc, char **argv)
|
|||||||
{"user", required_argument, 0, 'u'},
|
{"user", required_argument, 0, 'u'},
|
||||||
{"version", no_argument, 0, 'v'},
|
{"version", no_argument, 0, 'v'},
|
||||||
{"help", no_argument, 0, 0 },
|
{"help", no_argument, 0, 0 },
|
||||||
|
{"mpdpass", required_argument, 0, 'm'},
|
||||||
{0, 0, 0, 0 }
|
{0, 0, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
while((n = getopt_long(argc, argv, "h:p:w:u:v",
|
while((n = getopt_long(argc, argv, "h:p:w:u:v:m",
|
||||||
long_options, &option_index)) != -1) {
|
long_options, &option_index)) != -1) {
|
||||||
switch (n) {
|
switch (n) {
|
||||||
case 'h':
|
case 'h':
|
||||||
@ -105,6 +106,9 @@ int main(int argc, char **argv)
|
|||||||
case 'u':
|
case 'u':
|
||||||
run_as_user = strdup(optarg);
|
run_as_user = strdup(optarg);
|
||||||
break;
|
break;
|
||||||
|
case 'm':
|
||||||
|
mpd.password = strdup(optarg);
|
||||||
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
fprintf(stdout, "ympd %d.%d.%d\n"
|
fprintf(stdout, "ympd %d.%d.%d\n"
|
||||||
"Copyright (C) 2014 Andrew Karpow <andy@ndyk.de>\n"
|
"Copyright (C) 2014 Andrew Karpow <andy@ndyk.de>\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user