From aba6ec311d40741e990b22e52051fdf66f8e95c5 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam Date: Tue, 12 Mar 2019 19:29:07 +0800 Subject: Add systemd for oclip service Issue-ID: CLI-129 Change-Id: I763afc46b31644700f10b3de191cf89463536aa4 Signed-off-by: Kanagaraj Manickam k00365106 --- .../zip/src/main/release/bin/oclip-service.sh | 4 ++++ .../main/release/conf/oclip-grpc-server.properties | 15 +++++++++++++++ deployment/zip/src/main/release/conf/oclip.service | 22 ++++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 deployment/zip/src/main/release/bin/oclip-service.sh create mode 100644 deployment/zip/src/main/release/conf/oclip-grpc-server.properties create mode 100644 deployment/zip/src/main/release/conf/oclip.service (limited to 'deployment/zip') diff --git a/deployment/zip/src/main/release/bin/oclip-service.sh b/deployment/zip/src/main/release/bin/oclip-service.sh new file mode 100644 index 00000000..897a6052 --- /dev/null +++ b/deployment/zip/src/main/release/bin/oclip-service.sh @@ -0,0 +1,4 @@ +#! /bin/bash + +export OPEN_CLI_HOME=/opt/oclip +$OPEN_CLI_HOME/bin/oclip-grpc-server.sh diff --git a/deployment/zip/src/main/release/conf/oclip-grpc-server.properties b/deployment/zip/src/main/release/conf/oclip-grpc-server.properties new file mode 100644 index 00000000..972fdebb --- /dev/null +++ b/deployment/zip/src/main/release/conf/oclip-grpc-server.properties @@ -0,0 +1,15 @@ +# Copyright 2018 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +oclip.grpc_server_port=50051 \ No newline at end of file diff --git a/deployment/zip/src/main/release/conf/oclip.service b/deployment/zip/src/main/release/conf/oclip.service new file mode 100644 index 00000000..1492ac0d --- /dev/null +++ b/deployment/zip/src/main/release/conf/oclip.service @@ -0,0 +1,22 @@ +# +#systemd file: /etc/systemd/system/oclip.service +# +[Unit] +Description=Open CLI Platform gRPC service + +[Service] +#User=ubuntu + +#change this to your workspace +WorkingDirectory=/opt/oclip + +#path to executable. +ExecStart=/opt/oclip/bin/oclip-service.sh + +#SuccessExitStatus=143 +#TimeoutStopSec=10 +#Restart=on-failure +#RestartSec=5 + +[Install] +WantedBy=multi-user.target -- cgit 1.2.3-korg