Commit 7e40b73e authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Reverted back to use config.json

parent 5828c460
......@@ -14,6 +14,7 @@ all: acs-cwmp-service acs-fs-service acs-nbi-service acs-ui-service genieacs-con
@echo "$$GENIEACS_LOGROTATE" > /etc/logrotate.d/genieacs
install -v -Dm755 genieacs /usr/share/easycwmp/functions
install -v -Dm755 genieacs-init /usr/sbin/genieacs-init
ln -s /run/genieacs/config.json /srv/genieacs/config/config.json
@echo "d /run/genieacs 0755 root root -" > /usr/lib/tmpfiles.d/genieacs.conf
......@@ -36,8 +37,7 @@ Description=GenieACS CWMP
[Service]
Environment="NODE_PATH=/srv/genieacs/node_modules"
ConditionFileNotEmpty=/run/genieacs/config.env
EnvironmentFile=/run/genieacs/config.env
ConditionFileNotEmpty=/run/genieacs/config.json
Restart=always
ExecStartPre=/usr/sbin/genieacs-init
ExecStart=/srv/genieacs/bin/genieacs-cwmp
......@@ -54,8 +54,7 @@ Description=GenieACS file system
[Service]
Environment="NODE_PATH=/srv/genieacs/node_modules"
ConditionFileNotEmpty=/run/genieacs/config.env
EnvironmentFile=/run/genieacs/config.env
ConditionFileNotEmpty=/run/genieacs/config.json
Restart=always
ExecStartPre=/usr/sbin/genieacs-init
ExecStart=/srv/genieacs/bin/genieacs-fs
......@@ -72,8 +71,7 @@ Description=GenieACS north bound interface
[Service]
Environment="NODE_PATH=/srv/genieacs/node_modules"
ConditionFileNotEmpty=/run/genieacs/config.env
EnvironmentFile=/run/genieacs/config.env
ConditionFileNotEmpty=/run/genieacs/config.json
Restart=always
ExecStartPre=/usr/sbin/genieacs-init
ExecStart=/srv/genieacs/bin/genieacs-nbi
......@@ -90,8 +88,7 @@ Description=GenieACS user interface
[Service]
Environment="NODE_PATH=/srv/genieacs/node_modules"
ConditionFileNotEmpty=/run/genieacs/config.env
EnvironmentFile=/run/genieacs/config.env
ConditionFileNotEmpty=/run/genieacs/config.json
Restart=always
ExecStartPre=/usr/sbin/genieacs-init
ExecStart=/srv/genieacs/bin/genieacs-ui
......
......@@ -9,24 +9,26 @@ FS=`$UCI_GET genieacs.settings.fs_interface`
UI=`$UCI_GET genieacs.settings.ui_interface`
SECRET=`$UCI_GET genieacs.settings.secret`
if [ ! -z $MONGODB ] && [ ! -z $NBI ] && [ ! -z $FS ] ; then
cat << EOF > /run/genieacs/config.env
MONGODB_CONNECTION_URL=$MONGODB
EXT_DIR=/srv/genieacs/ext
EXT_TIMEOUT=3000
CWMP_INTERFACE=$CWMP
CWMP_PORT=7547
CWMP_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-cwmp-access.log
NBI_INTERFACE=$NBI
NBI_PORT=7557
NBI_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-nbi-access.log
FS_INTERFACE=$FS
FS_PORT=7567
FS_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-fs-access.log
UI_INTERFACE=$UI
UI_PORT=80
UI_JWT_SECRET=$SECRET
ACS_UI_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-ui-access.log
DEBUG_FILE=/var/log/genieacs/genieacs-debug.yaml
cat << EOF > /run/genieacs/config.json
{
"MONGODB_CONNECTION_URL": "$MONGODB",
"EXT_DIR": "/srv/genieacs/ext",
"EXT_TIMEOUT": "3000",
"CWMP_INTERFACE": "$CWMP",
"CWMP_PORT": "7547",
"CWMP_ACCESS_LOG_FILE": "/var/log/genieacs/genieacs-cwmp-access.log",
"NBI_INTERFACE": "$NBI",
"NBI_PORT": "7557",
"NBI_ACCESS_LOG_FILE": "/var/log/genieacs/genieacs-nbi-access.log",
"FS_INTERFACE": "$FS",
"FS_PORT": "7567",
"FS_ACCESS_LOG_FILE": "/var/log/genieacs/genieacs-fs-access.log",
"UI_INTERFACE": "$UI",
"UI_PORT": "80",
"UI_JWT_SECRET": "$SECRET",
"ACS_UI_ACCESS_LOG_FILE": "/var/log/genieacs/genieacs-ui-access.log",
"DEBUG_FILE": "/var/log/genieacs/genieacs-debug.yaml"
}
EOF
else
rm -f /run/genieacs/config.json
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment