To set up geostreaming as a service in a ubuntu machine use the following service file in `/lib/systemd/system/geostreams.service `service`
Code Block | ||
---|---|---|
| ||
# # This file is centrally managed and will be replaced every 30 minutes # To make changes to this file contact Rob Kooper (kooper@illinois.edu) # [Unit] Description=GEO TEMPORAL API V3 After=network.target [Service] User=clowder Group=users Restart=on-failure WorkingDirectory=/home/clowder ExecStartPre=/bin/bash -c "if [ -d /home/clowder/geo-temporal-api-v3 ]; then if [ -f /home/clowder/geo-temporal-api-v3/RUNNING_PID ]; then if ps -p `cat /home/clowder/geo-temporal-api-v3/RUNNING_PID` > /dev/null ; then echo \"Found running version, killing old version\"; kill `cat /home/clowder/geo-temporal-api-v3/RUNNING_PID`; fi; rm /home/clowder/geo-temporal-api-v3/RUNNING_PID; fi; fi" ExecStart=/home/clowder/geo-temporal-api-v3/bin/geostreams -Dhttp.port=9002 -Dplay.http.secret.key="SOMESECRETKEY" -Dapplication.context=/geostreams/ -mem 2048 -Dconfig.file=/home/clowder/geo-temporal-api-v3/custom/application.conf [Install] WantedBy=multi-user.target ~ |
...