-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6d478fc
Showing
613 changed files
with
125,016 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# INFO.sh | ||
[ -f /pkgscripts/include/pkg_util.sh ] && . /pkgscripts/include/pkg_util.sh | ||
[ -f /pkgscripts-ng/include/pkg_util.sh ] && . /pkgscripts-ng/include/pkg_util.sh | ||
|
||
package="phpvirtualbox4dsm" | ||
version="5.2" | ||
displayname="phpVirtualBox" | ||
maintainer="seba" | ||
maintainer_url="http://github.com/seba76/" | ||
distributor="seba" | ||
description="A web interface to manage and access Virtualbox machines." | ||
report_url="https://github.com/seba76/phpvirtualbox4dsm/" | ||
support_url="https://github.com/seba76/phpvirtualbox4dsm/" | ||
install_dep_package="WebStation:PHP7.0" | ||
#install_dep_services="apache-web" | ||
#start_stop_restart_services="nginx" | ||
#instuninst_restart_services="nginx" | ||
thirdparty="true" | ||
#support_conf_folder="yes" | ||
#install_reboot="yes" | ||
changelog="Version: 5.2" | ||
reloadui="no" | ||
startable="no" | ||
#dsmuidir="ui" | ||
adminurl="/phpvirtualbox4dsm/" | ||
arch="noarch" | ||
firmware="$1" | ||
[ "$(caller)" != "0 NULL" ] && return 0 | ||
pkg_dump_info |
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,14 @@ | ||
#!/bin/bash | ||
|
||
touch /logs/phpvirtualbox.build | ||
|
||
# if env MakeClean is set to yes clean | ||
case ${MakeClean} in | ||
[Yy][Ee][Ss]) | ||
;; | ||
esac | ||
|
||
# url links and file names | ||
. ./.config | ||
|
||
touch /logs/phpvirtualbox.build |
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,13 @@ | ||
# SynoBuildConf/depends | ||
|
||
[BuildDependent] | ||
# each line here is a dependent project | ||
|
||
[ReferenceOnly] | ||
# each line here is a project for reference only but no need to be built | ||
|
||
[5.2] | ||
all="5.2" | ||
|
||
[default] | ||
all="6.1" # build environment for other platforms should be DSM 5.2 |
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,84 @@ | ||
#!/bin/bash | ||
|
||
PKG_NAME="phpvirtualbox" | ||
INST_DIR="/tmp/_${PKG_NAME}" | ||
PKG_DIR="/tmp/_${PKG_NAME}_pkg" | ||
PKG_DEST="/image/packages" | ||
DATE=$(date +%Y%m%d) | ||
SRC=$(pwd) | ||
|
||
PrepareDirs() { | ||
for dir in $INST_DIR $PKG_DIR; do | ||
rm -rf "$dir" | ||
done | ||
for dir in $INST_DIR $PKG_DIR $PKG_DEST; do | ||
mkdir -p "$dir" | ||
done | ||
} | ||
|
||
Install() { | ||
### what platform is this | ||
case "$BUILD_TARGET" in | ||
PPC_QORIQ) | ||
echo "PPC_QORIQ is unsupported platform!" | ||
exit 1 | ||
;; | ||
X64) | ||
PLATFORM="x86_64" | ||
;; | ||
BROMOLOWESM|BROMOLOW) | ||
PLATFORM="bromolow" | ||
;; | ||
MARVELL_88F6281) | ||
echo "MARVELL_88F6281 is unsupported platform!" | ||
exit 1 | ||
;; | ||
*) | ||
echo "${BUILD_TARGET} unsupported platform!" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
cp -r package/* "${INST_DIR}/" | ||
|
||
# fix permissions | ||
chown root:root ${INST_DIR} -R | ||
} | ||
|
||
GenerateINFO() { | ||
### Generate INFO file | ||
./INFO.sh "${DSM_SHLIB_MAJOR}.${DSM_SHLIB_MINOR}-${DSM_BUILD_NUM}" "${DATE}" > spk/INFO | ||
#./INFO.sh > spk/INFO | ||
cp spk/INFO "${PKG_DIR}" | ||
cp spk/INFO INFO | ||
} | ||
|
||
InstallSynologyConfig(){ | ||
### Copy licence | ||
cp -av spk/LICENSE "${PKG_DIR}" | ||
cp -r spk/scripts/ "${PKG_DIR}" | ||
cp spk/PACKAGE_ICON{,_256}.PNG "${PKG_DIR}" | ||
cp -r spk/WIZARD_UIFILES/ "${PKG_DIR}" | ||
} | ||
|
||
MakePackage() { | ||
[ -f /pkgscripts/include/pkg_util.sh ] && source /pkgscripts/include/pkg_util.sh | ||
[ -f /pkgscripts-ng/include/pkg_util.sh ] && source /pkgscripts-ng/include/pkg_util.sh | ||
|
||
|
||
### fix permissions | ||
chown root:root $PKG_DIR/* -R | ||
|
||
pkg_make_package $INST_DIR $PKG_DIR | ||
pkg_make_spk $PKG_DIR $PKG_DEST | ||
} | ||
|
||
main() { | ||
PrepareDirs | ||
Install | ||
GenerateINFO | ||
InstallSynologyConfig | ||
MakePackage | ||
} | ||
|
||
main "$@" |
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 |
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,76 @@ | ||
#!/bin/sh | ||
PhpVirtualBoxUrl=https://github.com/phpvirtualbox/phpvirtualbox/archive/5.2-0.zip | ||
PhpVirtualBoxVersion=5.2 | ||
|
||
# If files don't exist they need to be downloaded | ||
PhpVirtualBoxFile=phpVirtualBox.zip | ||
PackageRoot=./package/www | ||
Destination=${PackageRoot}/phpvirtualbox4dsm | ||
|
||
WGET=$(which wget) | ||
UNZIP=$(which unzip) | ||
|
||
if [ "$WGET" == "" ]; then | ||
WGET=./wget | ||
fi | ||
|
||
if [ "$UNZIP" == "" ]; then | ||
UNZIP="./unzip" | ||
fi | ||
|
||
function download_phpvbox() | ||
{ | ||
if [ ! -f ./${PhpVirtualBoxFile} ]; then | ||
echo "Downloading ${PhpVirtualBoxFile}" | ||
$WGET ${PhpVirtualBoxUrl} -O ${PhpVirtualBoxFile} | ||
rm -rf ${Destination} | ||
fi | ||
} | ||
|
||
function generate_config() | ||
{ | ||
if [ ! -d ${Destination} ]; then | ||
${UNZIP} ${PhpVirtualBoxFile} -d ${PackageRoot}/ | ||
VB=$(ls -d ${PackageRoot}/phpvirtualbox-*) | ||
mv ${VB} ${Destination} | ||
echo "Generating config.php.synology" | ||
cp ${Destination}/config.php-example ${PackageRoot}/config.php.synology | ||
sed -i -e "s|^var \$username = 'vbox';|var \$username = '@user@';|g" ${PackageRoot}/config.php.synology | ||
sed -i -e "s|^var \$password = 'pass';|var \$password = '@pass@';|g" ${PackageRoot}/config.php.synology | ||
sed -i -e "s|^var \$location = 'http://127\.0\.0\.1:18083/';|var \$location = '@location@';|g" ${PackageRoot}/config.php.synology | ||
sed -i -e "s|^#var \$noAuth = true;|var \$noAuth = @noAuth@;|g" ${PackageRoot}/config.php.synology | ||
sed -i -e "s|^#var \$enableCustomIcons = true;|var \$enableCustomIcons = @enableCustomIcons@;|g" ${PackageRoot}/config.php.synology | ||
sed -i -e "s|^#var \$enableAdvancedConfig = true;|var \$enableAdvancedConfig = @enableAdvancedConfig@;|g" ${PackageRoot}/config.php.synology | ||
sed -i -e "s|^#var \$startStopConfig = true;|var \$startStopConfig = @startStopConfig@;|g" ${PackageRoot}/config.php.synology | ||
sed -i -e "s|^#var \$enableGuestAdditionsVersionDisplay = true;|var \$enableGuestAdditionsVersionDisplay = true;|g" ${PackageRoot}/config.php.synology | ||
sed -i "/#var \$browserRestrictFolders/a var \$browserRestrictFolders = array('/volume1');" ${PackageRoot}/config.php.synology | ||
# fix for not working file browser | ||
#echo "Patching jqueryFileTree.php" | ||
#sed -i -e "s|^header('Content-type', 'application/json');|header('Content-type: application/json');|g" ${Destination}/endpoints/jqueryFileTree.php | ||
fi | ||
|
||
echo "Generating .config" | ||
echo "PhpVirtualBoxFile=${PhpVirtualBoxFile}" >> .config | ||
} | ||
|
||
function update_info | ||
{ | ||
echo "Update version in INFO.sh" | ||
sed -i -e "s|^version=.*|version=\"${PhpVirtualBoxVersion}\"|g" INFO.sh | ||
} | ||
|
||
case $1 in | ||
prep) | ||
download_phpvbox | ||
generate_config | ||
update_info | ||
;; | ||
clean) | ||
rm $PhpVirtualBoxFile | ||
rm -rf $Destination | ||
rm .config | ||
;; | ||
*) | ||
echo "Usage: ./config.sh prep|clean"; | ||
;; | ||
esac |
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,13 @@ | ||
# VirtualBox installation directory | ||
INSTALL_DIR='/opt/VirtualBox' | ||
# VirtualBox version | ||
INSTALL_VER='5.0.36' | ||
INSTALL_REV='114008' | ||
# Build type and user name for logging purposes | ||
BUILD_TYPE='release' | ||
VBOXWEB_HOST='127.0.0.1' | ||
VBOXWEB_USER='root' | ||
VBOXWEB_LOGFILE=/var/log/vbox.log | ||
VBOXWEB_AUTH_LIBRARY=null | ||
SHUTDOWN_USERS=root | ||
SHUTDOWN=acpibutton |
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,4 @@ | ||
[Credentials] | ||
url=@url@ | ||
user=root | ||
pass=@pwhash@ |
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,6 @@ | ||
<Directory "/var/services/phpvirtualbox"> | ||
Options MultiViews | ||
AllowOverride None | ||
Order allow,deny | ||
Allow from all | ||
</Directory> |
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,36 @@ | ||
location ~* \.php(/|$) { | ||
root /usr/syno/synoman; | ||
fastcgi_split_path_info ^(.+?\.php)(.*)$; | ||
|
||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; | ||
fastcgi_param QUERY_STRING $query_string; | ||
fastcgi_param REQUEST_METHOD $request_method; | ||
fastcgi_param CONTENT_TYPE $content_type; | ||
fastcgi_param CONTENT_LENGTH $content_length; | ||
|
||
fastcgi_param SCRIPT_NAME $fastcgi_script_name; | ||
fastcgi_param REQUEST_URI $request_uri; | ||
fastcgi_param DOCUMENT_URI $document_uri; | ||
fastcgi_param DOCUMENT_ROOT $document_root; | ||
fastcgi_param SERVER_PROTOCOL $server_protocol; | ||
fastcgi_param HTTPS $https if_not_empty; | ||
|
||
fastcgi_param GATEWAY_INTERFACE CGI/1.1; | ||
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; | ||
|
||
fastcgi_param REMOTE_ADDR $remote_addr; | ||
fastcgi_param REMOTE_PORT $remote_port; | ||
fastcgi_param SERVER_ADDR $server_addr; | ||
fastcgi_param SERVER_PORT $server_port; | ||
fastcgi_param SERVER_NAME $host; | ||
# PHP only, required if PHP was built with --enable-force-cgi-redirect | ||
fastcgi_param REDIRECT_STATUS 200; | ||
fastcgi_intercept_errors on; | ||
|
||
try_files $fastcgi_script_name =404; | ||
|
||
fastcgi_param PATH_INFO $fastcgi_path_info; | ||
fastcgi_pass unix:/run/php-fpm/php56-fpm.sock; | ||
|
||
} |
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,26 @@ | ||
zend_extension = opcache.so | ||
extension = apcu.so | ||
|
||
extension = bz2.so | ||
;extension = syno_compiler.so | ||
|
||
extension = exif.so | ||
extension = gd.so | ||
extension = iconv.so | ||
extension = pdo_pgsql.so | ||
extension = pgsql.so | ||
extension = zip.so | ||
|
||
extension = calendar.so | ||
extension = openssl.so | ||
extension = pdo_sqlite.so | ||
extension = sqlite3.so | ||
extension = curl.so | ||
extension = soup.so | ||
|
||
[PATH=/var/packages/phpvirtualbox/target/ui] | ||
open_basedir = "/var/packages/phpvirtualbox/target/ui" | ||
upload_max_filesize ="32G" | ||
post_max_size ="32G" | ||
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE | ||
session.save_path = "/var/services/tmp/phpvirtualbox" |
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,11 @@ | ||
[virtualbox] | ||
title="VirtualBox Remote Desktop Server Port" | ||
desc="VirtualBox" | ||
port_forward="yes" | ||
dst.ports="9000:9100/tcp" | ||
|
||
[virtualbox] | ||
title="VirtualBox Web Service Port" | ||
desc="vboxwebsrv" | ||
port_forward="no" | ||
dst.ports="18083/tcp" |
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,12 @@ | ||
{ | ||
".url": { | ||
"com.seba.phpvirtualbox": { | ||
"type": "legacy", | ||
"allUsers": true, | ||
"title": "PHPVirtualbox", | ||
"desc": "", | ||
"icon": "images/Virtualbox_{0}.png", | ||
"url": "/webman/3rdparty/phpvirtualbox/phpvirtualbox/index.html" | ||
} | ||
} | ||
} |
Oops, something went wrong.