]>
Commit | Line | Data |
---|---|---|
914dd76c IB |
1 | diff --git a/src/ympd.c b/src/ympd.c |
2 | index 3aed7e6..b3b6fda 100644 | |
3 | --- a/src/ympd.c | |
4 | +++ b/src/ympd.c | |
5 | @@ -71,6 +71,7 @@ int main(int argc, char **argv) | |
6 | char *run_as_user = NULL; | |
7 | char const *error_msg = NULL; | |
8 | char *webport = "8080"; | |
9 | + const char *s; | |
10 | ||
11 | atexit(bye); | |
12 | #ifdef WITH_DYNAMIC_ASSETS | |
13 | @@ -92,6 +93,10 @@ int main(int argc, char **argv) | |
14 | {0, 0, 0, 0 } | |
15 | }; | |
16 | ||
17 | + if ((s = getenv("MPD_PASSWORD")) != NULL) { | |
18 | + mpd.password = strdup(s); | |
19 | + } | |
20 | + | |
21 | while((n = getopt_long(argc, argv, "h:p:w:u:vm:", | |
22 | long_options, &option_index)) != -1) { | |
23 | switch (n) { |