diff --git a/dynamix.unraid.net.plg b/dynamix.unraid.net.plg index 12003da37..de8861e42 100644 --- a/dynamix.unraid.net.plg +++ b/dynamix.unraid.net.plg @@ -43,6 +43,14 @@ if [ -e /etc/rc.d/rc.unraid-api ]; then find /usr/local/emhttp/languages -type f \( -iname unraidnet.txt -o -iname unraidnet.dot \) -delete exit 0 fi +]]> + + + + + + @@ -73,9 +81,8 @@ require_once "$docroot/webGui/include/Translations.php"; $var = (array)parse_ini_file('state/var.ini'); $license_state = strtoupper(empty($var['regCheck']) ? $var['regTy'] : $var['regCheck']); $key_contents = str_replace(['+','/','='], ['-','_',''], trim(base64_encode(@file_get_contents($var['regFILE'])))); - -if (file_exists('/boot/config/plugins/dynamix/dynamix.cfg')) { - extract(parse_ini_file('/boot/config/plugins/dynamix/dynamix.cfg',true)); +if (file_exists('/boot/config/plugins/Unraid.net/myservers.cfg')) { + extract(parse_ini_file('/boot/config/plugins/Unraid.net/myservers.cfg',true)); } $arr = []; @@ -622,7 +629,7 @@ Tag="globe" ?> "", @@ -1153,8 +1160,8 @@ $cli = php_sapi_name()=='cli'; $docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp'; -if (file_exists('/boot/config/plugins/dynamix/dynamix.cfg')) { - extract(parse_ini_file('/boot/config/plugins/dynamix/dynamix.cfg',true)); +if (file_exists('/boot/config/plugins/Unraid.net/myservers.cfg')) { + extract(parse_ini_file('/boot/config/plugins/Unraid.net/myservers.cfg',true)); } if (empty($remote)) { $remote = [ @@ -1592,7 +1599,7 @@ function handleMessage(e) { case "REG_WIZARD": if (data.apikey) { var postargs = { - '#file': 'dynamix/dynamix.cfg', + '#file': 'Unraid.net/myservers.cfg', '#section': 'remote', apikey: data.apikey, regWizTime: `${Date.now()}_${data.guid}`, // set when signing in the first time and never unset for the sake of displaying Sign In/Up in the UPC without needing to validate guid every time @@ -1607,7 +1614,7 @@ function handleMessage(e) { postargs['avatar'] = data.avatar; } $.post('/update.php', postargs, function() { - console.log('dynamix/dynamix.cfg: Updated apikey under [remote] section'); + console.log('Unraid.net/myservers.cfg: Updated apikey under [remote] section'); // send a ping back to the regwiz const payload = { event: 'ACCOUNT_PINGBACK', success: true, type: 'signIn', webGuiPathname: window.location.pathname }; e.source.postMessage(JSON.stringify(payload), e.origin); @@ -1643,14 +1650,14 @@ function handleMessage(e) { break; case "MYSERVERS_UNREGISTER": $.post('/update.php', { - '#file': 'dynamix/dynamix.cfg', + '#file': 'Unraid.net/myservers.cfg', '#section': 'remote', apikey: '', avatar: '', email: '', username: '', }, function() { - console.log('dynamix/dynamix.cfg: Unregistered myservers, cleared apikey under [remote] section'); + console.log('Unraid.net/myservers.cfg: Unregistered myservers, cleared apikey under [remote] section'); // send a ping back to the regwiz const payload = { event: 'ACCOUNT_PINGBACK', success: true, type: 'signOut', webGuiPathname: window.location.pathname }; e.source.postMessage(JSON.stringify(payload), e.origin);