// add 'ipaddr' function for 6.9 backwards compatibility
if (!function_exists('ipaddr')) {
function ipaddr($ethX='eth0', $prot=4) {
global $$ethX;
switch ($$ethX['PROTOCOL:0']) {
case 'ipv4':
return $$ethX['IPADDR:0'];
case 'ipv6':
return $$ethX['IPADDR6:0'];
case 'ipv4+ipv6':
switch ($prot) {
case 4: return $$ethX['IPADDR:0'];
case 6: return $$ethX['IPADDR6:0'];
default:return [$$ethX['IPADDR:0'],$$ethX['IPADDR6:0']];}
default:
return $$ethX['IPADDR:0'];
}
}
}
if (file_exists('/boot/config/plugins/dynamix.my.servers/myservers.cfg')) {
@extract(parse_ini_file('/boot/config/plugins/dynamix.my.servers/myservers.cfg',true));
}
// upc translations
$upc_translations = [
($_SESSION['locale']) ? $_SESSION['locale'] : 'en_US' => [
'getStarted' => _('Get Started'),
'signIn' => _('Sign In'),
'signUp' => _('Sign Up'),
'signInUp' => _('Sign In / Up'),
'signOut' => _('Sign Out'),
'error' => _('Error'),
'fixError' => _('Fix Error'),
'closeLaunchpad' => _('Close Launchpad and continue to webGUI'),
'installPlugin' => _('Install Plugin'),
'noThanks' => _('No thanks'),
'closePromo' => _('Close My Servers details and continue to webGUI'),
'promoHeading' => _('Enhance your Unraid experience with these
My Servers (BETA) features'),
'learnMore' => _('Learn more'),
'checkoutTheMyServersDocs' => _('Checkout the My Servers docs'),
'popUp' => _('Pop-up'),
'close' => _('Close'),
'backToPopUp' => sprintf(_('Back to %s'), _('Pop-up')),
'closePopUp' => sprintf(_('Close %s'), _('Pop-up')),
'contactSupport' => _('Contact Support'),
'lanIp' => sprintf(_('Click to copy LAN IP %s'), '{0}'),
'lanIpCopied' => _('LAN IP Copied'),
'continueToUnraid' => _('Continue to Unraid'),
'description' => _('Description'),
'year' => _('year'),
'years' => _('years'),
'month' => _('month'),
'months' => _('months'),
'day' => _('day'),
'days' => _('days'),
'hour' => _('hour'),
'hours' => _('hours'),
'minute' => _('minute'),
'minutes' => _('minutes'),
'second' => _('second'),
'seconds' => _('seconds'),
'ago' => _('ago'),
'basicPlusPro' => [
'heading' => _('Thank you for choosing Unraid OS and My Servers').'!',
'message' => [
'registered' => _('Connect to My Servers by signing in to Unraid.net'),
'upgradeEligible' => _('To support more storage devices as your server grows click Upgrade Key'),
],
],
'actions' => [
'purchase' => _('Purchase Key'),
'upgrade' => _('Upgrade Key'),
'recover' => _('Recover Key'),
'replace' => _('Replace Key'),
'replaceIneligible' => _('Replace Key Ineligible'),
'extend' => _('Extend Trial'),
'startTrial' => _('Start Trial'),
'signOutUnraidNet' => _('Sign Out of Unraid.net'),
'redeemActivationCode' => _('Redeem Activation Code'),
],
'upc' => [
'avatarAlt' => '{0} '._('Avatar'),
'confirmClosure' => _('Confirm closure then continue to webGUI'),
'closeDropdown' => _('Close dropdown'),
'openDropdown' => _('Open dropdown'),
'pleaseConfirmClosureYouHaveOpenPopUp' => _('Please confirm closure').'. '._('You have an open pop-up').'.',
'trialHasExpiredSeeOptions' => _('Trial has expired see options below'),
'errorCertRequiresSignIn' => _('Sign In before your Unraid.net SSL certificate expires'),
'removeMyServersPlugin' => _('Remove My Servers plugin'),
'continueUsingMyServers' => _('Continue using My Servers'),
'confirmMyServersPluginRemoval' => _('Confirm My Servers plugin removal'),
'removingMyServersPlugin' => _('Removing My Servers plugin…'),
'enhanceYourExperienceWithMyServers' => _('Enhance your experience with My Servers'),
'lanIpCopied' => _('LAN IP Copied'),
'installingMyServers' => _('Installing My Servers (beta)'),
'thankYouForInstallingMyServers' => _('Thank you installing My Servers') . '!',
'connectYourUnraidnetAccountToGetStarted' => _('Connect your Unraid.net account to get started'),
'noRemoteApikeyRegisteredWithPlg' => [
'heading' => _('My Servers Error'),
'msg' => _('Unraid.net re-authentication required'),
],
'errorTooManyDisks' => [
'heading' => 'Too many devices',
'msg' => [
'base' => 'You must upgrade your key to support more devices.',
'basic' => 'Your Basic key supports 6 devices.',
'plus' => 'Your Plus key supports 12 devices.',
],
],
'extraLinks' => [
'newTab' => sprintf(_('Opens %s in new tab'), '{0}'),
'myServers' => _('My Servers Dashboard'),
'forums' => _('Unraid Forums'),
'settings' => [
'text' => _('Settings'),
'title' => _('Settings > Management Access • Unraid.net'),
],
],
'meta' => [
'trial' => [
'active' => [
'date' => sprintf(_('Trial key expires at %s'), '{date}'),
'timeDiff' => sprintf(_('Trial expires in %s'), '{timeDiff}'),
],
'expired' => [
'date' => sprintf(_('Trial key expired at %s'), '{date}'),
'timeDiff' => sprintf(_('Trial expired %s'), '{timeDiff}'),
],
],
'uptime' => [
'date' => sprintf(_('Server up since %s'), '{date}'),
'readable' => sprintf(_('Uptime %s'), '{timeDiff}'),
],
],
'myServers' => [
'heading' => _('My Servers'),
'beta' => _('beta'),
'restarting' => _('Restarting…'),
'errors' => [
'unraidApi' => [
'heading' => _('Unraid API Error'),
'message' => _('Failed to connect to Unraid API'),
],
'myServers' => [
'heading' => _('My Servers Error'),
'message' => _('Please wait a moment and reload the page'),
],
],
'closeDetails' => _('Close Details'),
'loading' => _('Loading My Servers data'),
'displayingLastKnown' => _('Displaying last known server data'),
'mothership' => [
'connected' => _('Connected to Mothership'),
'notConnected' => _('Not Connected to Mothership'),
],
'accessLabels' => [
'current' => _('Current server'),
'local' => _('Local access'),
'offline' => _('Server Offline'),
'remote' => _('Remote access'),
'unavailable' => _('Access unavailable'),
],
'api' => [
'start' => _('Restart unraid-api'),
'startTitle' => _('Executes `unraid-api start`; no terminal needed'),
'stop' => _('Stop unraid-api'),
],
],
'opensNewHttpsWindow' => [
'base' => sprintf(_('Opens new HTTPS window to %s'), '{0}'),
'signIn' => sprintf(_('Opens new HTTPS window to %s'), _('Sign In')),
'signOut' => sprintf(_('Opens new HTTPS window to %s'), _('Sign Out')),
'purchase' => sprintf(_('Opens new HTTPS window to %s'), _('Purchase Key')),
'upgrade' => sprintf(_('Opens new HTTPS window to %s'), _('Upgrade Key')),
],
'signInActions' => [
'resolve' => _('Sign In to resolve'),
'purchaseKey' => _('Sign In to Purchase Key'),
'purchaseKeyOrExtendTrial' => '@:upc.signInActions.purchaseKey or @:actions.extend',
],
],
'stateData' => [
'ENOKEYFILE' => [
'humanReadable' => _('No Keyfile'),
'heading' => _("Let's unleash your hardware").'!',
'message' => '
'._('Your server will not be usable until you purchase a Registration key or install a free 30-day Trial key').'. '._('A Trial key provides all the functionality of a Pro Registration key').'.
'._('Registration keys are bound to your USB Flash boot device serial number (GUID)').'. '._('Please use a high quality name brand device at least 1GB in size (min 4GB recommended)').'.
'._('Note: USB memory card readers are generally not supported because most do not present unique serial numbers').'.
', ], 'TRIAL' => [ 'humanReadable' => _('Trial'), 'heading' => _('Thank you for choosing Unraid OS').'!', 'message' => _('Your Trial key includes all the functionality and device support of a Pro key').'. '._('After your Trial has reached expiration your server still functions normally until the next time you Stop the array or reboot your server').'. '._('At that point you may either purchase a license key or request a Trial extension').'.', '_extraMsg' => sprintf(_('You have %s remaining on your Trial key'), '{parsedExpireTime}'), ], 'EEXPIRED' => [ 'humanReadable' => _('Trial Expired'), 'heading' => _('Your Trial has expired'), 'message' => [ 'base' => _('To continue using Unraid OS you may purchase a license key').'. ', 'extensionNotEligible' => _('You have used all your Trial extensions').'. @:stateData.EEXPIRED.message.base', 'extensionEligible' => '@:stateData.EEXPIRED.message.base '._('Alternately, you may request a Trial extension').'.', ], ], 'BASIC' => [ 'humanReadable' => _('Basic'), ], 'PLUS' => [ 'humanReadable' => _('Plus'), ], 'PRO' => [ 'humanReadable' => _('Pro'), ], 'EGUID' => [ 'humanReadable' => _('GUID Error'), 'error' => [ 'heading' => _('Registration key / GUID mismatch'), 'message' => [ 'default' => _('The license key file does not correspond to the USB Flash boot device').'. '._('Please copy the correct key file to the */config* directory on your USB Flash boot device or choose Purchase Key').'.', 'replacementIneligible' => _('Your Unraid registration key is ineligible for replacement as it has been replaced within the last 12 months').'.', 'replacementEligible' => _('The license key file does not correspond to the USB Flash boot device').'. '._('Please copy the correct key file to the */config* directory on your USB Flash boot device or choose Purchase Key or Replace Key').'.', 'blacklisted' => _('Your Unraid registration key is ineligible for replacement as it is blacklisted') . '.', ], ], ], 'ENOKEYFILE2' => [ 'humanReadable' => _('Missing key file'), 'error' => [ 'heading' => '@:stateData.ENOKEYFILE2.humanReadable', 'message' => _('It appears that your license key file is corrupted or missing').'. '._('The key file should be located in the */config* directory on your USB Flash boot device').'. '._('If you do not have a backup copy of your license key file you may install the My Servers (beta) plugin to attempt to recover your key').'. '._('If this was an expired Trial installation, you may purchase a license key').'.', ], ], 'ETRIAL' => [ 'humanReadable' => _('Invalid installation'), 'error' => [ 'heading' => '@:stateData.ETRIAL.humanReadable', 'message' => _('It is not possible to use a Trial key with an existing Unraid OS installation').'. '._('You may purchase a license key corresponding to this USB Flash device to continue using this installation').'.', ], ], 'ENOKEYFILE1' => [ 'humanReadable' => _('No Keyfile'), 'error' => [ 'heading' => _('No USB flash configuration data'), 'message' => _('There is a problem with your USB Flash device'), ], ], 'ENOFLASH' => [ 'humanReadable' => _('No Flash'), 'error' => [ 'heading' => _('Cannot access your USB Flash boot device'), 'message' => _('There is a physical problem accessing your USB Flash boot device'), ], ], 'EGUID1' => [ 'humanReadable' => _('Multiple License Keys Present'), 'error' => [ 'heading' => '@:stateData.EGUID1.humanReadable', 'message' => _('There are multiple license key files present on your USB flash device and none of them correspond to the USB Flash boot device').'. '._('Please remove all key files except the one you want to replace from the */config* directory on your USB Flash boot device').'. '._('Alternately you may purchase a license key for this USB flash device').'. '._('If you want to replace one of your license keys with a new key bound to this USB Flash device please first remove all other key files first').'.', ], ], 'EBLACKLISTED' => [ 'humanReadable' => _('BLACKLISTED'), 'error' => [ 'heading' => _('Blacklisted USB Flash GUID'), 'message' => _('This USB Flash boot device has been blacklisted').'. '._('This can occur as a result of transferring your license key to a replacement USB Flash device, and you are currently booted from your old USB Flash device').'. '._('A USB Flash device may also be blacklisted if we discover the serial number is not unique – this is common with USB card readers').'.', ], ], 'EBLACKLISTED1' => [ 'humanReadable' =>'@:stateData.EBLACKLISTED.humanReadable', 'error' => [ 'heading' => _('USB Flash device error'), 'message' => _('This USB Flash device has an invalid GUID').'. '._('Please try a different USB Flash device').'.', ], ], 'EBLACKLISTED2' => [ 'humanReadable' => '@:stateData.EBLACKLISTED.humanReadable', 'error' => [ 'heading' => _('USB Flash has no serial number'), 'message' => '@:stateData.EBLACKLISTED.error.message', ], ], 'ENOCONN' => [ 'humanReadable' => _('Trial Requires Internet Connection'), 'error' => [ 'heading' => _('Cannot validate Unraid Trial key'), 'message' => _('Your Trial key requires an internet connection').'. '._('Please check Settings > Network').'.', ], ], 'STALE' => [ 'humanReadable' => _('Stale'), 'error' => [ 'heading' => _('Stale Server'), 'message' => _('Please refresh the page to ensure you load your latest configuration'), ], ], ], 'regWizPopUp' => [ 'regWiz' => _('Registration Wizard'), 'toHome' => _('To Registration Wizard Home'), 'continueTrial' => _('Continue Trial'), 'serverInfoToggle' => _('Toggle server info visibility'), 'youCanSafelyCloseThisWindow' => _('You can safely close this window'), 'automaticallyClosingIn' => sprintf(_('Auto closing in %s'), '{0}'), 'byeBye' => _('bye bye 👋'), 'browserWillSelfDestructIn' => sprintf(_('Browser will self destruct in %s'), '{0}'), 'closingPopUpMayLeadToErrors' => _('Closing this pop-up window while actions are being preformed may lead to unintended errors'), 'goBack' => _('Go Back'), 'shutDown' => _('Shut Down'), 'haveAccountSignIn' => _('Already have an account').'? '._('Sign In'), 'noAccountSignUp' => _('Do not have an account').'? '._('Sign Up'), 'willConnectYourServerToMyServers' => _('This will connect your server to My Servers BETA'), 'serverInfo' => [ 'flash' => _('Flash'), 'product' => _('Product'), 'GUID' => _('GUID'), 'name' => _('Name'), 'ip' => _('IP'), ], 'forms' => [ 'displayName' => _('Display Name'), 'emailAddress' => _('Email Address'), 'displayNameOrEmailAddress' => _('Display Name or Email Address'), 'displayNameRootMessage' => _('Use your Unraid.net credentials, not your local server credentials'), 'honeyPotCopy' => _('If you fill this field out then your email will not be sent'), 'fieldRequired' => _('This field is required'), 'submit' => _('Submit'), 'submitting' => _('Submitting'), 'notValid' => _('Form not valid'), 'cancel' => _('Cancel'), 'confirm' => _('Confirm'), 'createMyAccount' => _('Create My Account'), 'subject' => _('Subject'), 'password' => _('Password'), 'togglePasswordVisibility' => _('Toggle Password Visibility'), 'message' => _('Message'), 'confirmPassword' => _('Confirm Password'), 'passwordMustMatch' => _('Password confirmation must match'), 'passwordMinimum' => _('8 or more characters'), 'comments' => _('comments'), 'newsletterCopy' => _('Sign me up for the monthly Unraid newsletter').': '._('a digest of recent blog posts, community videos, popular forum threads, product announcements, and more'), 'terms' => [ 'iAgree' => _('I agree to the'), 'text' => _('Terms of Use'), ], ], 'routes' => [ 'extendTrial' => [ 'heading' => [ 'loading' => _('Extending Trial'), 'error' => _('Trial Extension Failed'), ], 'message' => _('Not ready to purchase?').'