Add support to configure Http or Https
Make distinct packages for phpMyAdim 4.9.0, 4.9.1 and 5.0.0 (beta)
@ -1,7 +1,6 @@
|
||||
adminurl="/phpMyAdmin/"
|
||||
arch="noarch"
|
||||
beta="no"
|
||||
checksum="342085ed7cb45fd8c9b5a6b4488c8aa2"
|
||||
checksum="8de710311db060cac4431ae3645d4a3d"
|
||||
ctl_stop="yes"
|
||||
ctl_uninstall="yes"
|
||||
description="This is a repackaging of the Synology package with phpMyAdmin, the free software tool designed to manage the MySQL databases. Manage the MySQL databases stored on your DiskStation by installing this package. This repackaging replaces the dependency on php 5.6 by 7.3"
|
||||
@ -29,9 +28,10 @@ displayname="MODS phpMyAdmin 4.9.0"
|
||||
displayname_enu="MODS phpMyAdmin 4.9.0"
|
||||
distributor="vletroye"
|
||||
distributor_url="http://olympe.letroye.be/sspks/?arch=all"
|
||||
dsmappname="SYNO.SDS._ThirdParty.App.phpMyAdmin"
|
||||
dsmappname="SYNO.SDS._ThirdParty.App.MODS_phpMyAdmin_490"
|
||||
dsmuidir="ui"
|
||||
firmware="6.0-7313"
|
||||
install_conflict_packages="MODS_phpMyAdmin_491:MODS_phpMyAdmin_500:phpMyAdmin"
|
||||
install_dep_packages="WebStation:PHP7.3"
|
||||
install_reboot="no"
|
||||
instuninst_restart_services="nginx"
|
||||
@ -39,7 +39,7 @@ maintainer="phpMyAdmin devel team"
|
||||
maintainer_url="http://www.phpmyadmin.net"
|
||||
offline_install="no"
|
||||
os_min_ver="6.0-7313"
|
||||
package="phpMyAdmin"
|
||||
package="MODS_phpMyAdmin_490"
|
||||
precheckstartstop="no"
|
||||
silent_install="yes"
|
||||
silent_uninstall="yes"
|
||||
@ -49,4 +49,4 @@ startable="yes"
|
||||
startstop_restart_services="nginx"
|
||||
support_center="yes"
|
||||
thirdparty="yes"
|
||||
version="4.9.0.1-0193"
|
||||
version="4.9.0.1-0217"
|
||||
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
37
MODS phpMyAdmin 4.9.0/WIZARD_UIFILES/install_uifile
Normal file
@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
"step_title": "Configure access to phpMyAdmin",
|
||||
"invalid_next_disabled": true,
|
||||
"items": [
|
||||
{
|
||||
"type": "singleselect",
|
||||
"desc": "Select a protocol:",
|
||||
"subitems": [
|
||||
{
|
||||
"key": "MODS_Http",
|
||||
"defaultValue": "true",
|
||||
"desc": "Http"
|
||||
},
|
||||
{
|
||||
"key": "MODS_Https",
|
||||
"defaultValue": "false",
|
||||
"desc": "Https"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "textfield",
|
||||
"desc": "Enter a port (keep empty to use the 80 or 443):",
|
||||
"subitems": [
|
||||
{
|
||||
"key": "MODS_Port",
|
||||
"defaultValue": "",
|
||||
"validator": {
|
||||
"allowBlank": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
@ -1,29 +0,0 @@
|
||||
{
|
||||
"php73": {
|
||||
"php-ini": [{
|
||||
"relpath": "php_conf/phpMyAdmin.ini",
|
||||
"destpath": "/usr/local/etc/php73/conf.d"
|
||||
}]
|
||||
},
|
||||
"sdk-plugin": {
|
||||
"plugins": [{
|
||||
"event": "mariadb5_start",
|
||||
"relpath": "tool/mariadb5_start_phpMyAdmin"
|
||||
}, {
|
||||
"event": "mariadb5_stop",
|
||||
"relpath": "tool/mariadb5_stop_phpMyAdmin"
|
||||
}, {
|
||||
"event": "mariadb10_start",
|
||||
"relpath": "tool/mariadb10_start_phpMyAdmin"
|
||||
}, {
|
||||
"event": "mariadb10_stop",
|
||||
"relpath": "tool/mariadb10_stop_phpMyAdmin"
|
||||
}]
|
||||
},
|
||||
"indexdb": {
|
||||
"app-index": {
|
||||
"conf-relpath": "ui/index.conf",
|
||||
"db-relpath": "indexdb/appindexdb"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
".url": {
|
||||
"SYNO.SDS._ThirdParty.App.phpMyAdmin.phpMyAdmin": {
|
||||
"SYNO.SDS._ThirdParty.App.MODS_phpMyAdmin_490": {
|
||||
"itemType": 0,
|
||||
"type": "url",
|
||||
"allUsers": false,
|
||||
"title": "phpMyAdmin",
|
||||
"title": "phpMyAdmin 4.9.0",
|
||||
"desc": "app:app_name",
|
||||
"icon": "images/phpMyAdmin_{0}.png",
|
||||
"protocol": "http",
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 569 B After Width: | Height: | Size: 569 B |
Before Width: | Height: | Size: 993 B After Width: | Height: | Size: 998 B |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
@ -1,5 +1,5 @@
|
||||
{
|
||||
"app": "SYNO.SDS.phpMyAdmin",
|
||||
"app": "SYNO.SDS._ThirdParty.App.MODS_phpMyAdmin_490",
|
||||
"title": "app:app_name",
|
||||
"desc": "app:description",
|
||||
"stringset": "texts",
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
PKG_NAME=phpMyAdmin
|
||||
WEB_PHPMYADMIN="/var/services/web/$PKG_NAME"
|
||||
TARGET_PATH="/var/packages/$PKG_NAME/target"
|
||||
TARGET_PATH="/var/packages/$SYNOPKG_PKGNAME/target"
|
||||
TOOL_DIR="$TARGET_PATH/tool/"
|
||||
PHPMYADMIN_NIGNX_CONF="$TARGET_PATH/nginx_conf"
|
||||
|
||||
|
@ -16,6 +16,25 @@ else
|
||||
blowfish_secret=$(/usr/bin/openssl rand -base64 32)
|
||||
fi
|
||||
sed -i "s|__BLOWFISH_SECRET__|$blowfish_secret|" "$WEB_PHPMYADMIN/config.inc.php"
|
||||
|
||||
if [ "$MODS_Http" == "true" ]; then
|
||||
MODS_Protocol="http"
|
||||
else
|
||||
MODS_Protocol="https"
|
||||
fi
|
||||
|
||||
if [ -z "$MODS_Port" ]; then
|
||||
if [ "$MODS_Protocol" == "http" ]; then
|
||||
MODS_Port=80
|
||||
else
|
||||
MODS_Port=443
|
||||
fi
|
||||
fi
|
||||
|
||||
sed -i "s|\"protocol\":.*$|\"protocol\": \"$MODS_Protocol\",|" "$TARGET_PATH/ui/config"
|
||||
sed -i "s|\"url\":.*$|\"url\": \"/$PKG_NAME/\",|" "$TARGET_PATH/ui/config"
|
||||
sed -i "s|\"port\":.*$|\"port\": $MODS_Port,|" "$TARGET_PATH/ui/config"
|
||||
|
||||
mkdir -p /usr/syno/etc/packages/phpMyAdmin/nginx
|
||||
|
||||
"$TOOL_DIR"/serverchoicetool.php INIT
|
||||
|
@ -1,7 +1,6 @@
|
||||
adminurl="/phpMyAdmin/"
|
||||
arch="noarch"
|
||||
beta="no"
|
||||
checksum="2127dc17172be5e1d56958c5e00f5443"
|
||||
checksum="6772eb3579cbc29e12f76075528369a5"
|
||||
ctl_stop="yes"
|
||||
ctl_uninstall="yes"
|
||||
description="This is a repackaging of the Synology package with phpMyAdmin, the free software tool designed to manage the MySQL databases. Manage the MySQL databases stored on your DiskStation by installing this package. This repackaging use phpMyAdmin 4.9.1 instead of 4.9.0 and use php7.3 instead of php 5.6"
|
||||
@ -29,9 +28,10 @@ displayname="MODS phpMyAdmin 4.9.1"
|
||||
displayname_enu="MODS phpMyAdmin 4.9.1"
|
||||
distributor="vletroye"
|
||||
distributor_url="http://olympe.letroye.be/sspks/?arch=all"
|
||||
dsmappname="SYNO.SDS._ThirdParty.App.phpMyAdmin"
|
||||
dsmappname="SYNO.SDS._ThirdParty.App.MODS_phpMyAdmin_491"
|
||||
dsmuidir="ui"
|
||||
firmware="6.0-7313"
|
||||
install_conflict_packages="MODS_phpMyAdmin_490:MODS_phpMyAdmin_500:phpMyAdmin"
|
||||
install_dep_packages="WebStation:PHP7.3"
|
||||
install_reboot="no"
|
||||
instuninst_restart_services="nginx"
|
||||
@ -39,7 +39,7 @@ maintainer="phpMyAdmin devel team"
|
||||
maintainer_url="http://www.phpmyadmin.net"
|
||||
offline_install="no"
|
||||
os_min_ver="6.0-7313"
|
||||
package="phpMyAdmin"
|
||||
package="MODS_phpMyAdmin_491"
|
||||
precheckstartstop="no"
|
||||
silent_install="yes"
|
||||
silent_uninstall="yes"
|
||||
@ -49,4 +49,4 @@ startable="yes"
|
||||
startstop_restart_services="nginx"
|
||||
support_center="yes"
|
||||
thirdparty="yes"
|
||||
version="4.9.1-0011"
|
||||
version="4.9.1-0012"
|
||||
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
@ -1,10 +1,10 @@
|
||||
{
|
||||
".url": {
|
||||
"SYNO.SDS._ThirdParty.App.phpMyAdmin.phpMyAdmin": {
|
||||
"SYNO.SDS._ThirdParty.App.MODS_phpMyAdmin_491": {
|
||||
"itemType": 0,
|
||||
"type": "url",
|
||||
"allUsers": false,
|
||||
"title": "phpMyAdmin",
|
||||
"title": "phpMyAdmin 4.9.1",
|
||||
"desc": "app:app_name",
|
||||
"icon": "images/phpMyAdmin_{0}.png",
|
||||
"protocol": "http",
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"app": "SYNO.SDS.phpMyAdmin",
|
||||
"app": "SYNO.SDS._ThirdParty.App.MODS_phpMyAdmin_491",
|
||||
"title": "app:app_name",
|
||||
"desc": "app:description",
|
||||
"stringset": "texts",
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
PKG_NAME=phpMyAdmin
|
||||
WEB_PHPMYADMIN="/var/services/web/$PKG_NAME"
|
||||
TARGET_PATH="/var/packages/$PKG_NAME/target"
|
||||
TARGET_PATH="/var/packages/$SYNOPKG_PKGNAME/target"
|
||||
TOOL_DIR="$TARGET_PATH/tool/"
|
||||
PHPMYADMIN_NIGNX_CONF="$TARGET_PATH/nginx_conf"
|
||||
|
||||
|
@ -16,6 +16,25 @@ else
|
||||
blowfish_secret=$(/usr/bin/openssl rand -base64 32)
|
||||
fi
|
||||
sed -i "s|__BLOWFISH_SECRET__|$blowfish_secret|" "$WEB_PHPMYADMIN/config.inc.php"
|
||||
|
||||
if [ "$MODS_Http" == "true" ]; then
|
||||
MODS_Protocol="http"
|
||||
else
|
||||
MODS_Protocol="https"
|
||||
fi
|
||||
|
||||
if [ -z "$MODS_Port" ]; then
|
||||
if [ "$MODS_Protocol" == "http" ]; then
|
||||
MODS_Port=80
|
||||
else
|
||||
MODS_Port=443
|
||||
fi
|
||||
fi
|
||||
|
||||
sed -i "s|\"protocol\":.*$|\"protocol\": \"$MODS_Protocol\",|" "$TARGET_PATH/ui/config"
|
||||
sed -i "s|\"url\":.*$|\"url\": \"/$PKG_NAME/\",|" "$TARGET_PATH/ui/config"
|
||||
sed -i "s|\"port\":.*$|\"port\": $MODS_Port,|" "$TARGET_PATH/ui/config"
|
||||
|
||||
mkdir -p /usr/syno/etc/packages/phpMyAdmin/nginx
|
||||
|
||||
"$TOOL_DIR"/serverchoicetool.php INIT
|
||||
|
@ -1,4 +1,3 @@
|
||||
adminurl="/phpMyAdmin/"
|
||||
arch="noarch"
|
||||
beta="yes"
|
||||
checksum="3037364760641ba29041bf3dd6d7fc7c"
|
||||
@ -29,9 +28,10 @@ displayname="MODS phpMyAdmin 5.0.0"
|
||||
displayname_enu="MODS phpMyAdmin 5.0.0"
|
||||
distributor="vletroye"
|
||||
distributor_url="http://olympe.letroye.be/sspks/?arch=all"
|
||||
dsmappname="SYNO.SDS._ThirdParty.App.phpMyAdmin"
|
||||
dsmappname="SYNO.SDS._ThirdParty.App.MODS_phpMyAdmin_500"
|
||||
dsmuidir="ui"
|
||||
firmware="6.0-7313"
|
||||
install_conflict_packages="MODS_phpMyAdmin_490:MODS_phpMyAdmin_491:phpMyAdmin"
|
||||
install_dep_packages="WebStation:PHP7.3"
|
||||
install_reboot="no"
|
||||
instuninst_restart_services="nginx"
|
||||
@ -39,7 +39,7 @@ maintainer="phpMyAdmin devel team"
|
||||
maintainer_url="http://www.phpmyadmin.net"
|
||||
offline_install="no"
|
||||
os_min_ver="6.0-7313"
|
||||
package="phpMyAdmin"
|
||||
package="MODS_phpMyAdmin_500"
|
||||
precheckstartstop="no"
|
||||
silent_install="yes"
|
||||
silent_uninstall="yes"
|
||||
@ -49,4 +49,4 @@ startable="yes"
|
||||
startstop_restart_services="nginx"
|
||||
support_center="yes"
|
||||
thirdparty="yes"
|
||||
version="5.0.0-0007"
|
||||
version="5.0.0-0009"
|
||||
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
19
MODS phpMyAdmin 5.0.0/package/phpMyAdmin/vendor/symfony/polyfill-php73/LICENSE
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
Copyright (c) 2018-2019 Fabien Potencier
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
43
MODS phpMyAdmin 5.0.0/package/phpMyAdmin/vendor/symfony/polyfill-php73/Php73.php
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Polyfill\Php73;
|
||||
|
||||
/**
|
||||
* @author Gabriel Caruso <carusogabriel34@gmail.com>
|
||||
* @author Ion Bazan <ion.bazan@gmail.com>
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
final class Php73
|
||||
{
|
||||
public static $startAt = 1533462603;
|
||||
|
||||
/**
|
||||
* @param bool $asNum
|
||||
*
|
||||
* @return array|float|int
|
||||
*/
|
||||
public static function hrtime($asNum = false)
|
||||
{
|
||||
$ns = microtime(false);
|
||||
$s = substr($ns, 11) - self::$startAt;
|
||||
$ns = 1E9 * (float) $ns;
|
||||
|
||||
if ($asNum) {
|
||||
$ns += $s * 1E9;
|
||||
|
||||
return \PHP_INT_SIZE === 4 ? $ns : (int) $ns;
|
||||
}
|
||||
|
||||
return array($s, (int) $ns);
|
||||
}
|
||||
}
|
18
MODS phpMyAdmin 5.0.0/package/phpMyAdmin/vendor/symfony/polyfill-php73/README.md
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
Symfony Polyfill / Php73
|
||||
========================
|
||||
|
||||
This component provides functions added to PHP 7.3 core:
|
||||
|
||||
- [`array_key_first`](https://php.net/array_key_first)
|
||||
- [`array_key_last`](https://php.net/array_key_last)
|
||||
- [`hrtime`](https://php.net/function.hrtime)
|
||||
- [`is_countable`](https://php.net/is_countable)
|
||||
- [`JsonException`](https://php.net/JsonException)
|
||||
|
||||
More information can be found in the
|
||||
[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
|
||||
|
||||
License
|
||||
=======
|
||||
|
||||
This library is released under the [MIT license](LICENSE).
|
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class JsonException extends Exception
|
||||
{
|
||||
}
|
32
MODS phpMyAdmin 5.0.0/package/phpMyAdmin/vendor/symfony/polyfill-php73/bootstrap.php
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Symfony\Polyfill\Php73 as p;
|
||||
|
||||
if (PHP_VERSION_ID < 70300) {
|
||||
if (!function_exists('is_countable')) {
|
||||
function is_countable($var) { return is_array($var) || $var instanceof Countable || $var instanceof ResourceBundle || $var instanceof SimpleXmlElement; }
|
||||
}
|
||||
|
||||
if (!function_exists('hrtime')) {
|
||||
require_once __DIR__.'/Php73.php';
|
||||
p\Php73::$startAt = (int) microtime(true);
|
||||
function hrtime($asNum = false) { return p\Php73::hrtime($asNum); }
|
||||
}
|
||||
|
||||
if (!function_exists('array_key_first')) {
|
||||
function array_key_first(array $array) { foreach ($array as $key => $value) { return $key; } }
|
||||
}
|
||||
|
||||
if (!function_exists('array_key_last')) {
|
||||
function array_key_last(array $array) { end($array); return key($array); }
|
||||
}
|
||||
}
|
32
MODS phpMyAdmin 5.0.0/package/phpMyAdmin/vendor/symfony/polyfill-php73/composer.json
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "symfony/polyfill-php73",
|
||||
"type": "library",
|
||||
"description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
|
||||
"keywords": ["polyfill", "shim", "compatibility", "portable"],
|
||||
"homepage": "https://symfony.com",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "Symfony\\Polyfill\\Php73\\": "" },
|
||||
"files": [ "bootstrap.php" ],
|
||||
"classmap": [ "Resources/stubs" ]
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.12-dev"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
".url": {
|
||||
"SYNO.SDS._ThirdParty.App.phpMyAdmin.phpMyAdmin": {
|
||||
"SYNO.SDS._ThirdParty.App.MODS_phpMyAdmin_500": {
|
||||
"itemType": 0,
|
||||
"type": "url",
|
||||
"allUsers": false,
|
||||
"title": "phpMyAdmin",
|
||||
"title": "phpMyAdmin 5.0.0",
|
||||
"desc": "app:app_name",
|
||||
"icon": "images/phpMyAdmin_{0}.png",
|
||||
"protocol": "http",
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
PKG_NAME=phpMyAdmin
|
||||
WEB_PHPMYADMIN="/var/services/web/$PKG_NAME"
|
||||
TARGET_PATH="/var/packages/$PKG_NAME/target"
|
||||
TARGET_PATH="/var/packages/$SYNOPKG_PKGNAME/target"
|
||||
TOOL_DIR="$TARGET_PATH/tool/"
|
||||
PHPMYADMIN_NIGNX_CONF="$TARGET_PATH/nginx_conf"
|
||||
|
||||
|
@ -16,6 +16,25 @@ else
|
||||
blowfish_secret=$(/usr/bin/openssl rand -base64 32)
|
||||
fi
|
||||
sed -i "s|__BLOWFISH_SECRET__|$blowfish_secret|" "$WEB_PHPMYADMIN/config.inc.php"
|
||||
|
||||
if [ "$MODS_Http" == "true" ]; then
|
||||
MODS_Protocol="http"
|
||||
else
|
||||
MODS_Protocol="https"
|
||||
fi
|
||||
|
||||
if [ -z "$MODS_Port" ]; then
|
||||
if [ "$MODS_Protocol" == "http" ]; then
|
||||
MODS_Port=80
|
||||
else
|
||||
MODS_Port=443
|
||||
fi
|
||||
fi
|
||||
|
||||
sed -i "s|\"protocol\":.*$|\"protocol\": \"$MODS_Protocol\",|" "$TARGET_PATH/ui/config"
|
||||
sed -i "s|\"url\":.*$|\"url\": \"/$PKG_NAME/\",|" "$TARGET_PATH/ui/config"
|
||||
sed -i "s|\"port\":.*$|\"port\": $MODS_Port,|" "$TARGET_PATH/ui/config"
|
||||
|
||||
mkdir -p /usr/syno/etc/packages/phpMyAdmin/nginx
|
||||
|
||||
"$TOOL_DIR"/serverchoicetool.php INIT
|
||||
|