File tree Expand file tree Collapse file tree 2 files changed +36
-1
lines changed
Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,9 @@ class UploadPictureConsumer implements ConsumerInterface
168168* ` bitrix-abbitmq:setup-fabric ` Sets up the Rabbit MQ fabric
169169* ` bitrix-rabbitmq:stdin-producer ` Executes a producer that reads data from STDIN
170170
171- В папке ` /install/bin ` модуля лежит файл ` rabbitmq ` . После установки модуля нужно скопировать его в ` php/bin ` .
171+ В папке ` /install/bin ` модуля лежит файл ` rabbitmq ` . При установке модуля система попробует скопировать его в директорию,
172+ ` bin ` , лежащую двумя уровнями выше ` DOCUMENT_ROOT ` . Если такой директории не существует, то сделано ничего не будет. Придется
173+ создать папку руками и скопировать туда файл вручную.
172174
173175Запуск:
174176
Original file line number Diff line number Diff line change @@ -93,6 +93,39 @@ public function DoUninstall()
9393 }
9494 }
9595
96+ /**
97+ * @inheritDoc
98+ */
99+ public function InstallFiles ()
100+ {
101+ parent ::InstallFiles ();
102+
103+ $ rootDir = Application::getDocumentRoot ().'/ ' ;
104+ $ binFile = '/rabbitmq ' ;
105+
106+ if (is_dir ($ rootDir . '../../bin ' )) {
107+ $ src = __DIR__ . '/bin ' . $ binFile ;
108+ copy ($ src , $ rootDir . '../../bin ' . $ binFile );
109+ }
110+
111+ return true ;
112+ }
113+
114+ /**
115+ * @inheritDoc
116+ */
117+ public function UnInstallFiles ()
118+ {
119+ parent ::UnInstallFiles ();
120+
121+ $ rootDir = Application::getDocumentRoot ().'/ ' ;
122+ $ binFile = '/rabbitmq ' ;
123+
124+ @unlink ($ rootDir . '../../bin ' . $ binFile );
125+
126+ return true ;
127+ }
128+
96129 /**
97130 * @return boolean
98131 */
You can’t perform that action at this time.
0 commit comments