forked from verdnatura/hedera-web
access-version fixes
This commit is contained in:
parent
54dd5a21cf
commit
5a8b0447dd
|
@ -1,4 +1,4 @@
|
||||||
hedera-web (1.407.03) stable; urgency=low
|
hedera-web (1.407.04) stable; urgency=low
|
||||||
|
|
||||||
* Initial Release.
|
* Initial Release.
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ services:
|
||||||
target: /etc/hedera-web/config.test.php
|
target: /etc/hedera-web/config.test.php
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/storage/image:/var/lib/hedera-web/image-db
|
- /mnt/storage/image:/var/lib/hedera-web/image-db
|
||||||
- /mnt/storage/vn-access:/mnt/storage/vn-access
|
- /mnt/storage/vn-access:/var/lib/hedera-web/vn-access
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 3
|
replicas: 3
|
||||||
cron:
|
cron:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "hedera-web",
|
"name": "hedera-web",
|
||||||
"version": "1.407.03",
|
"version": "1.407.04",
|
||||||
"description": "Verdnatura web page",
|
"description": "Verdnatura web page",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -56,16 +56,18 @@ class AccessVersion extends Vn\Web\JsonRequest {
|
||||||
$appName = $_REQUEST['appName'];
|
$appName = $_REQUEST['appName'];
|
||||||
$newVersion = $_REQUEST['newVersion'];
|
$newVersion = $_REQUEST['newVersion'];
|
||||||
|
|
||||||
$uploadDir = '/mnt/storage/vn-access';
|
$accessDir = _DATA_DIR .'/'. $this->app->getName() .'/vn-access';
|
||||||
$uploadFile = "$uploadDir/$appName.7z";
|
$headFile = "$accessDir/$appName.7z";
|
||||||
$archiveDir = "$uploadDir/.archive/$appName";
|
$archiveRelPath = ".archive/$appName/$newVersion.7z";
|
||||||
$archiveFile = "$archiveDir/$newVersion.7z";
|
$archiveFullPath = "$accessDir/$archiveRelPath";
|
||||||
|
|
||||||
// Updates the application
|
// Updates the application
|
||||||
|
|
||||||
copy($moduleFile['tmp_name'], $archiveFile);
|
rename($moduleFile['tmp_name'], $archiveFullPath);
|
||||||
rename($moduleFile['tmp_name'], $uploadFile);
|
chmod($archiveFullPath, 0644);
|
||||||
chmod($archiveFile, 0644);
|
|
||||||
|
@unlink ($headFile);
|
||||||
|
symlink($headFile, $archiveRelPath);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue