mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 23:25:56 -05:00
34 lines
634 B
C
34 lines
634 B
C
/*
|
|
* $Id$
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
|
|
#define os_opensyslog()
|
|
#define os_syslog(a,b)
|
|
#define os_closesyslog()
|
|
|
|
#include "conf.h"
|
|
#include "err.h"
|
|
|
|
|
|
int main(int argc, char *argv[]) {
|
|
int err;
|
|
|
|
printf("Reading %s\n",argv[1]);
|
|
|
|
if((err=conf_read(argv[1])) != CONF_E_SUCCESS) {
|
|
printf("Error reading config: %d\n",err);
|
|
conf_close();
|
|
} else {
|
|
printf("Read config!\n");
|
|
conf_set_string("general","stupid","lalala");
|
|
conf_set_int("potato","yummy",0);
|
|
if(conf_iswritable()) {
|
|
printf("writing config\n");
|
|
conf_write();
|
|
}
|
|
}
|
|
conf_close();
|
|
}
|