created systemd service

This commit is contained in:
lukas-heiligenbrunner 2019-10-23 13:18:43 +02:00
parent 436051d641
commit d91a52c6ba
2 changed files with 13 additions and 0 deletions

View File

@ -35,6 +35,7 @@ target_link_libraries(iprefresher api logger ${CURL_LIBRARIES} )
# INSTALL to SYSTEM #
install (TARGETS iprefresher DESTINATION bin)
install(FILES ./iprefresher.service DESTINATION /lib/systemd/system/)
SET(CPACK_DEB_COMPONENT_INSTALL 1)

12
iprefresher.service Normal file
View File

@ -0,0 +1,12 @@
[Unit]
Description=IP Refresher
After=network.target
[Service]
ExecStart=iprefresher -l
WorkingDirectory=/root
StandardOutput=inherit
StandardError=inherit
Restart=always
User=root
[Install]
WantedBy=multi-user.target