From de6630a0dc22fb1cc2c59e02e55ab1d98af76160 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Thu, 20 Nov 2025 16:03:04 +0100 Subject: [PATCH] Add CronMaster install script --- install/cronmaster-install.sh | 74 +++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 install/cronmaster-install.sh diff --git a/install/cronmaster-install.sh b/install/cronmaster-install.sh new file mode 100644 index 000000000..738e05199 --- /dev/null +++ b/install/cronmaster-install.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://github.com/fccview/cronmaster + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing dependencies" +$STD apt install -y pciutils +msg_ok "Installed dependencies" + +NODE_VERSION="24" NODE_MODULE="yarn" setup_nodejs + +setup_deb822_repo \ + "docker" \ + "https://download.docker.com/linux/debian/gpg" \ + "https://download.docker.com/linux/debian" \ + "trixie" \ + "stable" +$STD apt install -y docker-ce-cli +fetch_and_deploy_gh_release "cronmaster" "fccview/cronmaster" "tarball" + +msg_info "Setting up CronMaster" +AUTH_PASS="$(openssl rand -base64 18 | cut -c1-13)" +cd /opt/cronmaster +$STD yarn --frozen-lockfile +export NEXT_TELEMETRY_DISABLED=1 +$STD yarn build +cat </opt/cronmaster/.env +NODE_ENV=production +APP_URL= +LOCALE= +HOME= +AUTH_PASSWORD=${AUTH_PASS} +PORT=3000 +HOSTNAME="0.0.0.0" +NEXT_TELEMETRY_DISABLED=1 +EOF +{ + echo "CronMaster Credentials:" + echo "" + echo "Password: $AUTH_PASS" +}>>~/cronmaster.creds +msg_ok "Setup CronMaster" + +msg_info "Creating Service" +cat </etc/systemd/system/cronmaster.service +[Unit] +Description=CronMaster Service +After=network.target + +[Service] +EnvironmentFile=/opt/cronmaster/.env +WorkingDirectory=/opt/cronmaster +ExecStart=/usr/bin/yarn start +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl start --now -q cronmaster +msg_info "Created Service" + +motd_ssh +customize +cleanup_lxc