mirror of
https://github.com/nextepc/nextepc-oss.git
synced 2025-10-23 04:52:17 +00:00
MongoDB re-connect using systemd
This commit is contained in:
18
debian/changelog
vendored
18
debian/changelog
vendored
@@ -1,3 +1,21 @@
|
||||
nextepc (0.2-3~artful) artful; urgency=medium
|
||||
|
||||
* MongoDB re-connect using systemd
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Tue, 31 Oct 2017 12:10:18 +0000
|
||||
|
||||
nextepc (0.2-3~zesty) zesty; urgency=medium
|
||||
|
||||
* MongoDB re-connect using systemd
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Tue, 31 Oct 2017 12:07:36 +0000
|
||||
|
||||
nextepc (0.2-3~xenial) xenial; urgency=medium
|
||||
|
||||
* MongoDB re-connect using systemd
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Tue, 31 Oct 2017 12:00:16 +0000
|
||||
|
||||
nextepc (0.2-2~artful) artful; urgency=medium
|
||||
|
||||
* Fix PGW installation
|
||||
|
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
@@ -0,0 +1 @@
|
||||
3.0 (native)
|
@@ -271,7 +271,7 @@ status_t context_db_init(const char *db_uri)
|
||||
if (!mongoc_client_get_server_status(self.db_client, NULL, &reply, &error))
|
||||
{
|
||||
d_error("Failed to conect to server [%s]", db_uri);
|
||||
return CORE_ERROR;
|
||||
return CORE_EAGAIN;
|
||||
}
|
||||
|
||||
d_assert(bson_iter_init_find(&iter, &reply, "ok"),
|
||||
|
7
main.c
7
main.c
@@ -80,6 +80,7 @@ int main(int argc, char *argv[])
|
||||
*
|
||||
* Keep the order of starting-up
|
||||
*/
|
||||
status_t rv;
|
||||
char *config_path = NULL;
|
||||
char *log_path = NULL;
|
||||
char *pid_path = NULL;
|
||||
@@ -138,8 +139,12 @@ int main(int argc, char *argv[])
|
||||
|
||||
core_initialize();
|
||||
app_log_pid(pid_path);
|
||||
if (app_initialize(config_path, log_path) != CORE_OK)
|
||||
rv = app_initialize(config_path, log_path);
|
||||
if (rv != CORE_OK)
|
||||
{
|
||||
if (rv == CORE_EAGAIN)
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
d_fatal("NextEPC initialization failed. Aborted");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ status_t app_will_initialize(const char *config_path, const char *log_path)
|
||||
if (rv != CORE_OK) return rv;
|
||||
}
|
||||
|
||||
return CORE_OK;
|
||||
return rv;
|
||||
}
|
||||
|
||||
status_t app_did_initialize(void)
|
||||
@@ -57,7 +57,7 @@ status_t app_did_initialize(void)
|
||||
status_t rv = app_logger_start();
|
||||
if (rv != CORE_OK) return rv;
|
||||
|
||||
return CORE_OK;
|
||||
return rv;
|
||||
}
|
||||
|
||||
void app_will_terminate(void)
|
||||
|
@@ -1,5 +1,6 @@
|
||||
[Unit]
|
||||
Description=NextEPC HSS Daemon
|
||||
BindTo=mongodb.service
|
||||
After=networking.service mongodb.service
|
||||
|
||||
[Service]
|
||||
@@ -12,7 +13,6 @@ RuntimeDirectory=nextepc-hssd
|
||||
PIDFile=@LIB_DIR@/run/nextepc-hssd/pid
|
||||
|
||||
Restart=always
|
||||
ExecStartPre=/bin/sleep 5
|
||||
ExecStart=@BIN_DIR@/nextepc-hssd -f @SYSCONF_DIR@/nextepc/hss.conf
|
||||
RestartSec=2
|
||||
RestartPreventExitStatus=1
|
||||
|
@@ -1,5 +1,6 @@
|
||||
[Unit]
|
||||
Description=NextEPC PCRF Daemon
|
||||
BindTo=mongodb.service
|
||||
After=networking.service mongodb.service
|
||||
|
||||
[Service]
|
||||
@@ -12,7 +13,6 @@ RuntimeDirectory=nextepc-pcrfd
|
||||
PIDFile=@LIB_DIR@/run/nextepc-pcrfd/pid
|
||||
|
||||
Restart=always
|
||||
ExecStartPre=/bin/sleep 5
|
||||
ExecStart=@BIN_DIR@/nextepc-pcrfd -f @SYSCONF_DIR@/nextepc/pcrf.conf
|
||||
RestartSec=2
|
||||
RestartPreventExitStatus=1
|
||||
|
Reference in New Issue
Block a user