Skip to content

Commit

Permalink
add Symfony/DI dependency to multiflexiAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitexus committed Dec 21, 2024
1 parent 6760af4 commit b8723f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions debian/multiflexi-api.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,9 @@ if [ "$1" = "configure" ] ; then
mv /usr/lib/multiflexi/composer.json.tmp /usr/lib/multiflexi/composer.json

composer-debian multiflexi

# Use sed to add the include statement before $builder = new ContainerBuilder();
sed -i "/\$builder = new ContainerBuilder();/i require_once '\/usr\/share\/php\/Symfony\/Component\/DependencyInjection\/autoload.php';" /usr/share/multiflexi/api/index.php


fi
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ override_dh_install:
rm debian/multiflexi/usr/lib/multiflexi/zabbixcompanylld.php
rm debian/multiflexi/usr/lib/multiflexi/zabbixlld.php
rm debian/multiflexi/usr/lib/multiflexi/zabbixlldactions.php
sed -i "/require_once __DIR__/crequire_once '/var/lib/composer/multiflexi/autoload.php';" debian/multiflexi-api/usr/share/multiflexi/api/index.php
sed -i "/require_once __DIR__/crequire_once '/var/lib/composer/multiflexi/autoload.php'; require_once '/usr/share/php/Symfony/Component/DependencyInjection/autoload.php'; " debian/multiflexi-api/usr/share/multiflexi/api/index.php
sed -i "/loadConfig/c\\\\\Ease\\\\Shared::singleton()->loadConfig('/etc/multiflexi/multiflexi.env', true);" debian/multiflexi-api/usr/share/multiflexi/api/index.php
sed -i "/setBasePath/c\$$app->setBasePath('/api');" debian/multiflexi-api/usr/share/multiflexi/api/index.php
sed -i "s/\/MultiFlexi\/src//" debian/multiflexi-api/usr/share/multiflexi/api/index.php

0 comments on commit b8723f0

Please sign in to comment.