diff options
Diffstat (limited to 'www/github-release-monitor/files')
3 files changed, 62 insertions, 0 deletions
diff --git a/www/github-release-monitor/files/github-release-monitor.env b/www/github-release-monitor/files/github-release-monitor.env new file mode 100644 index 000000000000..fd45a3bded85 --- /dev/null +++ b/www/github-release-monitor/files/github-release-monitor.env @@ -0,0 +1,8 @@ +NEXT_TELEMETRY_DISABLED=1 +NODE_ENV=production +HOSTNAME=0.0.0.0 +PORT=3000 +HTTPS=false +AUTH_SECRET=this_is_an_insecure_password_please_change_me +AUTH_USERNAME=admin +AUTH_PASSWORD=admin diff --git a/www/github-release-monitor/files/github-release-monitor.in b/www/github-release-monitor/files/github-release-monitor.in new file mode 100644 index 000000000000..0c47e7495ffb --- /dev/null +++ b/www/github-release-monitor/files/github-release-monitor.in @@ -0,0 +1,33 @@ +#!/bin/sh + +# PROVIDE: github_release_monitor +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Configuration settings for Github Release Monitor in /etc/rc.conf +# +# github_release_monitor_enable (bool): Enable Github Release Monitor. +# github_release_monitor_log (str): Log output. +# github_release_monitor_runas (str): User to run Github Release Monitor as. +# + +. /etc/rc.subr + +name="github_release_monitor" +desc="Self-hostable application to monitor GitHub repository releases" +rcvar="${name}_enable" + +load_rc_config $name + +: ${github_release_monitor_enable:="NO"} +: ${github_release_monitor_env_file:="%%PREFIX%%/etc/github-release-monitor.env"} +: ${github_release_monitor_log:="/var/log/github_release_monitor.log"} +: ${github_release_monitor_runas:="%%USER%%"} + +github_release_monitor_chdir="%%HOMEDIR%%" +pidfile="/var/run/${name}.pid" +procname="%%LOCALBASE%%/bin/node" +command="/usr/sbin/daemon" +command_args="-u '${github_release_monitor_runas}' -p '${pidfile}' -t '${desc}' -o '${github_release_monitor_log}' '${procname}' server.js" + +run_rc_command "$1" diff --git a/www/github-release-monitor/files/pkg-message.in b/www/github-release-monitor/files/pkg-message.in new file mode 100644 index 000000000000..8500015261bb --- /dev/null +++ b/www/github-release-monitor/files/pkg-message.in @@ -0,0 +1,21 @@ +[ +{ type: install + message: <<EOM +Github Release Monitor is installed + +1) Configure it in %%PREFIX%%/etc/github-release-monitor.env + + Default auth secret, username and password are not secure. + Please change them all before deploying Github Release Monitor + to a production environment. + +2) Enable it with + + sysrc github_release_monitor_enable=YES + +3) Start it with + + service github-release-monitor start +EOM +} +] |