Skip to content

Commit

Permalink
Decrease file size limit and improve install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ata-no-one committed Jun 5, 2024
1 parent e74cda6 commit aaf3a7a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash

if [ -z $CLIENT_ID ] || [ -z $CLIENT_SECRET ]; then
source .env-local || echo "No .env-local file found."

if [ -z "$CLIENT_ID" ] || [ -z "$CLIENT_SECRET" ]; then
echo "Please set CLIENT_ID and CLIENT_SECRET"
exit 1
fi
Expand All @@ -21,22 +23,22 @@ tar -xf ./build/artifacts/gdatavaas.tar.gz -C ./build/artifacts
docker cp ./build/artifacts/gdatavaas nextcloud-container:/var/www/html/apps/
docker exec -it nextcloud-container chown -R www-data:www-data /var/www/html/apps/gdatavaas

until docker exec --user www-data -it nextcloud-container php occ app:update --all >/dev/null
until docker exec --user www-data -it nextcloud-container php occ app:update --all
do
echo "Trying app update"
sleep 2
done

docker exec --user www-data -it nextcloud-container php occ app:enable gdatavaas

docker exec --user www-data -it nextcloud-container php occ config:app:set gdatavaas clientId --value=$CLIENT_ID
docker exec --user www-data -it nextcloud-container php occ config:app:set gdatavaas clientSecret --value=$CLIENT_SECRET
docker exec --user www-data -it nextcloud-container php occ config:app:set gdatavaas clientId --value="$CLIENT_ID"
docker exec --user www-data -it nextcloud-container php occ config:app:set gdatavaas clientSecret --value="$CLIENT_SECRET"
docker exec --user www-data -it nextcloud-container php occ config:app:set gdatavaas authMethod --value=ClientCredentials
docker exec --user www-data -it nextcloud-container php occ config:app:set gdatavaas autoScanFiles --value=true
docker exec --user www-data -it nextcloud-container php occ config:app:set gdatavaas scanQueueLength --value=100

docker exec --user www-data -it nextcloud-container php occ log:manage --level DEBUG
docker exec --user www-data -it nextcloud-container php occ app:disable firstrunwizard

source *.local
source install.local || echo "No additional install script found."
# docker exec --user www-data -it nextcloud-container php cron.php
2 changes: 1 addition & 1 deletion lib/Service/VerdictService.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
use VaasSdk\VaasOptions;

class VerdictService {
public const MAX_FILE_SIZE = 2147483646;
public const MAX_FILE_SIZE = 268435456;
private const APP_ID = "gdatavaas";

private string $username;
Expand Down

0 comments on commit aaf3a7a

Please sign in to comment.