-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved upgrade process, how using config file
- Loading branch information
Showing
10 changed files
with
123 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
#!/bin/sh | ||
|
||
/bin/cat > /tmp/wizard.php <<'EOF' | ||
<?php | ||
$ini_array = parse_ini_file("/var/packages/virtualbox4dsm/target/.config"); | ||
# page1 | ||
$wizard_on_stop_poweroff=$ini_array["wizard_on_stop_poweroff"]; | ||
$wizard_on_stop_acpibutton=$ini_array["wizard_on_stop_acpibutton"]; | ||
$wizard_on_stop_savestate=$ini_array["wizard_on_stop_savestate"]; | ||
$wizard_virtualbox_share=$ini_array["wizard_virtualbox_share"]; | ||
# page2 | ||
$wizard_bind_ip=$ini_array["wizard_bind_ip"]; | ||
$wizard_use_https=$ini_array["wizard_use_https"]; | ||
$wizard_use_vboxwebsvc_pass=$ini_array["wizard_use_vboxwebsvc_pass"]; | ||
$wizard_enable_wol=$ini_array["wizard_enable_wol"]; | ||
# page1 defaults | ||
if (empty($wizard_on_stop_poweroff)) $wizard_on_stop_poweroff = false; | ||
if (empty($wizard_on_stop_acpibutton)) $wizard_on_stop_acpibutton = true; | ||
if (empty($wizard_on_stop_savestate)) $wizard_on_stop_savestate = false; | ||
if (empty($wizard_virtualbox_share)) $wizard_virtualbox_share = "virtualbox"; | ||
# page2 defaults | ||
if (empty($wizard_bind_ip)) $wizard_bind_ip = "127.0.0.1"; | ||
if (empty($wizard_use_https)) $wizard_use_https = "false"; | ||
if (empty($wizard_use_vboxwebsvc_pass)) $wizard_use_vboxwebsvc_pass = "B24Lq3OfG24S"; | ||
if (empty($wizard_enable_wol)) $wizard_enable_wol = "false"; | ||
echo <<<EOF | ||
[ | ||
{ | ||
"step_title": "VirtualBox configuration (page 1 of 2)", | ||
"items": [{ | ||
"type": "singleselect", | ||
"desc": "On DSM shutdown what to do with running Guest VM?", | ||
"subitems": [{ | ||
"key": "wizard_on_stop_poweroff", | ||
"desc": "poweroff", | ||
"defaultValue": $wizard_on_stop_poweroff }, { | ||
"key": "wizard_on_stop_acpibutton", | ||
"desc": "acpibutton", | ||
"defaultValue": $wizard_on_stop_acpibutton }, { | ||
"key": "wizard_on_stop_savestate", | ||
"desc": "savestate", | ||
"defaultValue": $wizard_on_stop_savestate | ||
}] | ||
}, | ||
{ | ||
"type": "textfield", | ||
"desc": "Shared folder for VirtualBox VMs (e.g. virtualbox) will be created on first live volume.", | ||
"subitems": [{ | ||
"key": "wizard_virtualbox_share", | ||
"desc": "Shared folder", | ||
"defaultValue": "$wizard_virtualbox_share" | ||
}] | ||
}] | ||
}, | ||
{ | ||
"step_title": "VirtualBox configuration (page 2 of 2)", | ||
"items": [ | ||
{ | ||
"type": "textfield", | ||
"desc": "Vboxwebsrv SOAP service bind IP (not phpVirtualBox's URL)", | ||
"subitems": [{ | ||
"key": "wizard_bind_ip", | ||
"desc": "Bind to IP", | ||
"defaultValue": "$wizard_bind_ip" | ||
}] | ||
}, | ||
{ | ||
"type": "multiselect", | ||
"desc": "Should vboxwebsrv use HTTPS protocol (useful if bind IP is not 127.0.0.1).", | ||
"subitems": [{ | ||
"key": "wizard_use_https", | ||
"desc": "Use HTTPS", | ||
"defaultValue": $wizard_use_https | ||
}] | ||
}, | ||
{ | ||
"type": "textfield", | ||
"desc": "Authentication password for vboxwebsrv , used if bind IP is not 127.0.0.1", | ||
"subitems": [{ | ||
"key": "wizard_use_vboxwebsvc_pass", | ||
"desc": "vboxwebsvc password", | ||
"defaultValue": "$wizard_use_vboxwebsvc_pass" | ||
}] | ||
}, | ||
{ | ||
"type": "multiselect", | ||
"desc": "Enable WOL for guest VM's, you will be able to wake VM by sending standard magic packet to port 9 and VM's MAC address", | ||
"subitems": [{ | ||
"key": "wizard_enable_wol", | ||
"desc": "Enable WOL for VM", | ||
"defaultValue": $wizard_enable_wol | ||
}] | ||
}] | ||
} | ||
]; | ||
EOF; | ||
?> | ||
EOF | ||
|
||
/usr/bin/php -n /tmp/wizard.php > $SYNOPKG_TEMP_LOGFILE | ||
rm /tmp/wizard.php | ||
exit 0 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
install_uifile.sh |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
install_uifile.sh |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
install_uifile.sh |
Oops, something went wrong.