Initial implementation of user extensions
This commit is contained in:
1 parent
8ac94474aa
commit
27e9882071
4 files changed
+158
-9
No files matched your search
@@ -0,0 +1,27 @@
|
||||
###
|
||||
# Copyright 2013-2016 Zaid Abdulla
|
||||
#
|
||||
# GenieACS is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# GenieACS is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with GenieACS. If not, see <http://www.gnu.org/licenses/>.
|
||||
###
|
||||
|
||||
process.chdir(process.argv[2])
|
||||
script = require("#{process.argv[2]}/#{process.argv[3]}")
|
||||
|
||||
|
||||
process.on('message', (message) ->
|
||||
script[message[1]](message.slice(2), (err, res) ->
|
||||
throw err if err
|
||||
process.send([message[0], res])
|
||||
)
|
||||
)
|
||||
Reference in new issue
Block a user