mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-23 03:22:31 -05:00
set default config file location based on prefix
This commit is contained in:
parent
6d6f2d125f
commit
92e967e78c
@ -19,6 +19,15 @@ AC_CHECK_FUNCS(strptime)
|
||||
AC_CHECK_FUNCS(strtok_r)
|
||||
AM_CONDITIONAL(COND_REND_OSX,false)
|
||||
|
||||
if test "x$prefix" != xNONE; then
|
||||
CONFFILE="$prefix/etc/mt-daapd.conf"
|
||||
else
|
||||
CONFFILE="/etc/mt-daapd.conf"
|
||||
fi
|
||||
|
||||
|
||||
AC_DEFINE_UNQUOTED(CONFFILE,"${CONFFILE}",Where the config file is)
|
||||
|
||||
rend_posix=true
|
||||
db_sqlite=false
|
||||
db_sqlite3=false
|
||||
|
13
src/main.c
13
src/main.c
@ -90,17 +90,6 @@
|
||||
# include "rend.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Where the default configfile is. On the NSLU2 running unslung,
|
||||
* thats in /opt, not /etc. */
|
||||
#ifndef DEFAULT_CONFIGFILE
|
||||
#ifdef NSLU2
|
||||
#define DEFAULT_CONFIGFILE "/opt/etc/mt-daapd/mt-daapd.conf"
|
||||
#else
|
||||
#define DEFAULT_CONFIGFILE "/etc/mt-daapd.conf"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/** Seconds to sleep before checking for a shutdown or reload */
|
||||
#define MAIN_SLEEP_INTERVAL 2
|
||||
|
||||
@ -186,7 +175,7 @@ void usage(char *program) {
|
||||
*/
|
||||
int main(int argc, char *argv[]) {
|
||||
int option;
|
||||
char *configfile=DEFAULT_CONFIGFILE;
|
||||
char *configfile=CONFFILE;
|
||||
WSCONFIG ws_config;
|
||||
int reload=0;
|
||||
int start_time;
|
||||
|
Loading…
x
Reference in New Issue
Block a user