install-osrf.sh: systemd config for websocketd on Ubuntu 16.04 Xenial
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Fri, 27 Jul 2018 17:34:28 +0000 (10:34 -0700)
committerJeff Davis <jdavis@sitka.bclibraries.ca>
Fri, 27 Jul 2018 17:34:28 +0000 (10:34 -0700)
deployment/install-osrf.sh

index f13bac8..2dfe82f 100755 (executable)
@@ -145,9 +145,11 @@ if [[ ! -n "$SKIP_WEBSOCKETS" ]] ; then
   [[ -e "/tmp/websocketd" ]] && rm /tmp/websocketd
   [[ ! -e "/tmp/${WEBSOCKETD_ZIP}" ]] && su -c "cd /tmp && wget '${WEBSOCKETD_URL}' && unzip ${WEBSOCKETD_ZIP}" ${DEFAULT_USER}
   cp /tmp/websocketd /usr/local/bin/
-  WEBSOCKETD_INIT="/etc/init.d/websocketd"
+  WEBSOCKETD_INIT="/lib/systemd/system/websocketd-osrf.service"
   [[ -e "${WEBSOCKETD_INIT}" ]] && mv ${WEBSOCKETD_INIT} ${WEBSOCKETD_INIT}.bak
-  cp ${SITKACONF}/files/${WEBSOCKETD_INIT} ${WEBSOCKETD_INIT}
+  cp ${SITKACONF}/files/${WEBSOCKETD_INIT}/${HOSTNAME} ${WEBSOCKETD_INIT}
+  systemctl daemon-reload
+  systemctl enable websocketd-osrf
 
   #echo "websockets is installed!"
 fi