From 7ffd7a93c8b084b01165e79a104f115d1034e5f4 Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Fri, 20 Apr 2018 16:45:40 +0200 Subject: [PATCH] install lp-autoanswer service --- build/CMakeLists.txt | 4 ++++ build/rpm/lp-autoanswer.conf | 2 ++ build/rpm/lp-autoanswer.service | 11 +++++++++++ 3 files changed, 17 insertions(+) create mode 100644 build/rpm/lp-autoanswer.conf create mode 100644 build/rpm/lp-autoanswer.service diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt index ac389909d..2bedd3399 100644 --- a/build/CMakeLists.txt +++ b/build/CMakeLists.txt @@ -51,3 +51,7 @@ bc_generate_rpm_specfile("rpm/liblinphone.spec.cmake" "${PROJECT_SOURCE_DIR}/lib include(CPack) + +install(FILES rpm/lp-autoanswer.service DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/systemd/system) +install(FILES rpm/lp-autoanswer.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/etc/sysconfig + RENAME lp-autoanswer) diff --git a/build/rpm/lp-autoanswer.conf b/build/rpm/lp-autoanswer.conf new file mode 100644 index 000000000..de391eaaf --- /dev/null +++ b/build/rpm/lp-autoanswer.conf @@ -0,0 +1,2 @@ +OPTIONS=--verbose --listening-uri "sip:toto@localhost:5090" + diff --git a/build/rpm/lp-autoanswer.service b/build/rpm/lp-autoanswer.service new file mode 100644 index 000000000..1bb24ad6c --- /dev/null +++ b/build/rpm/lp-autoanswer.service @@ -0,0 +1,11 @@ +[Unit] +Description=Linphone autoanswer service +After=network.target + +[Service] +Type=simple +EnvironmentFile=/etc/sysconfig/lp-autoanswer +ExecStart=/usr/bin/lp-auto-answer $OPTIONS + +[Install] +WantedBy=multi-user.target