Try making sunshine on Linux stateless
This commit is contained in:
@@ -20,7 +20,7 @@ using namespace std::literals;
|
||||
#define PRIVATE_KEY_FILE CA_DIR "/cakey.pem"
|
||||
#define CERTIFICATE_FILE CA_DIR "/cacert.pem"
|
||||
|
||||
#define APPS_JSON_PATH SUNSHINE_ASSETS_DIR "/" APPS_JSON
|
||||
#define APPS_JSON_PATH SUNSHINE_CONFIG_DIR "/" APPS_JSON
|
||||
namespace config {
|
||||
|
||||
namespace nv {
|
||||
@@ -223,7 +223,7 @@ sunshine_t sunshine {
|
||||
{}, // Username
|
||||
{}, // Password
|
||||
{}, // Password Salt
|
||||
SUNSHINE_ASSETS_DIR "/sunshine.conf", // config file
|
||||
SUNSHINE_CONFIG_DIR "/sunshine.conf", // config file
|
||||
{}, // cmd args
|
||||
47989,
|
||||
};
|
||||
@@ -573,6 +573,10 @@ int apply_flags(const char *line) {
|
||||
}
|
||||
|
||||
void apply_config(std::unordered_map<std::string, std::string> &&vars) {
|
||||
if(!fs::exists(stream.file_apps.c_str())) {
|
||||
stream.file_apps = SUNSHINE_DEFAULT_DIR "/" APPS_JSON;
|
||||
}
|
||||
|
||||
for(auto &[name, val] : vars) {
|
||||
std::cout << "["sv << name << "] -- ["sv << val << ']' << std::endl;
|
||||
}
|
||||
@@ -754,6 +758,10 @@ int parse(int argc, char *argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
if(!fs::exists(sunshine.config_file.c_str())) {
|
||||
sunshine.config_file = SUNSHINE_DEFAULT_DIR "/sunshine.conf";
|
||||
}
|
||||
|
||||
auto vars = parse_config(read_file(sunshine.config_file.c_str()));
|
||||
|
||||
for(auto &[name, value] : cmd_vars) {
|
||||
|
||||
Reference in New Issue
Block a user