From 2607ee82a04843d2b28a603f57094e67c98682a2 Mon Sep 17 00:00:00 2001 From: akanealw Date: Wed, 18 Oct 2023 10:35:36 -0500 Subject: [PATCH] added cronicle installation script --- debian/debian-install-cronicle-worker.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 debian/debian-install-cronicle-worker.sh diff --git a/debian/debian-install-cronicle-worker.sh b/debian/debian-install-cronicle-worker.sh new file mode 100644 index 0000000..117f455 --- /dev/null +++ b/debian/debian-install-cronicle-worker.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +if [ "$EUID" -ne 0 ] + then + echo "Please run as root" + exit +fi + +# install nodejs +sudo apt-get update +sudo apt-get install -y ca-certificates curl gnupg +sudo mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +NODE_MAJOR=20 +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list +sudo apt-get update +sudo apt-get install nodejs -y + +# install cronicle worker +curl -s https://raw.githubusercontent.com/jhuckaby/Cronicle/master/bin/install.js | node +rm /opt/cronicle/conf/config.json +wget -qO /opt/cronicle/conf/config.json http://192.168.1.50/files/debian/cronicle-config.json +/opt/cronicle/bin/control.sh start