-
Notifications
You must be signed in to change notification settings - Fork 24
MODS GateOne
This is a repackaging of Gate One for Synology created with 'Mods Packager'.
The official Package of Gate One was not working anymore with DSM 6.x as you can read if you google on "Synology", "GateOne". Fortunately, M4tt075 did a fix which used to published on his GitHub.
I did download and customize M4tt075's package to open GateOne in a DSM iFrame instead of opening it in a new window. Obviously, it's still possible to access it on its own administration port!
A first fix was provided by Arnoxit and Daniele Segato See the whole story Here and Here.
Embedding Gate One in a DSM iFrame initially didn't work out of the box. I had to open a page doing a redirection to the administration url. With M4tt075 version, I don't have this issue anymore ?!
If GateOne does not run successfully the first time you open it windowed, use the context menu "Open in new window" and log in. Later, opening it windowed should work (I still don't know why this happened to me).
To open Gate One in a DSM iFrame, it was not sufficient to make the item "embedded" (legacy). I had to call a php page which redirects to the actual administration url. But to not depend on the WebStation and the package Init_3rdparty, I did also create a cgi script as illustrated in the package MODS HelloWorld CGI
Both (index.cgi and index.php) are stored in the folder /package/app/ and, INFO's field 'dsmuidir' being "app", the item opened by the Package is /webman/3rdparty/MODS_GateOne/index.cgi
index.cgi is like this:
#!/bin/sh
# Set redirect_status to 1 to get php cgi working.
REDIRECT_STATUS=1 export REDIRECT_STATUS
# Strip web base from SCRIPT_URL, concat it to parent directory
# and apply realpath to construct absolute path to requested script.
SCRIPT_FILENAME=$(pwd)/index.php export SCRIPT_FILENAME
if command -v php56-cgi > /dev/null 2>&1; then
CALL=$(which php56-cgi)
else
if command -v php70-cgi > /dev/null 2>&1; then
CALL=$(which php70-cgi)
else
if command -v php-cgi > /dev/null 2>&1; then
CALL=$(which php-cgi)
fi
fi
fi
CALL="$CALL -d open_basedir=none $SCRIPT_FILENAME 2>&1"
eval "$CALL"
and index.php is like this:
<?php
echo "<meta http-equiv='refresh' content='0; url=https://".$_SERVER['SERVER_NAME'].":8271/' />";
?>