diff --git a/trunk/conf/openwrt.conf b/trunk/conf/openwrt.conf index b2a82023f..c6dba121a 100644 --- a/trunk/conf/openwrt.conf +++ b/trunk/conf/openwrt.conf @@ -15,7 +15,7 @@ http_server { } vhost __defaultVhost__ { hls { - enabled on; + enabled off; } http_remux { enabled on; diff --git a/trunk/src/app/srs_app_server.cpp b/trunk/src/app/srs_app_server.cpp index 1fd14ff96..1b3109960 100644 --- a/trunk/src/app/srs_app_server.cpp +++ b/trunk/src/app/srs_app_server.cpp @@ -744,12 +744,22 @@ srs_error_t SrsServer::initialize_signal() srs_error_t SrsServer::acquire_pid_file() { + srs_error_t err = srs_success; + // when srs in dolphin mode, no need the pid file. if (_srs_config->is_dolphin()) { return srs_success; } std::string pid_file = _srs_config->get_pid_file(); + + // Try to create dir for pid file. + string pid_dir = srs_path_dirname(pid_file); + if (!srs_path_exists(pid_dir)) { + if ((err = srs_create_dir_recursively(pid_dir)) != srs_success) { + return srs_error_wrap(err, "create %s", pid_dir.c_str()); + } + } // -rw-r--r-- // 644