mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 20:42:43 +00:00
Update homebrewery
Add `dev_mode` to the HomeBrewery service, which starts the HomeBrewery project in live rebuild mode.
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
|
||||
# General Info
|
||||
name="homebrewery" # Safe name of program
|
||||
location="/usr/local/" # Install location
|
||||
program_name="homebrewery" # Name of exec
|
||||
title="HomeBrewery" # Title to display in top/htop
|
||||
|
||||
@@ -37,13 +38,24 @@ pidfile="/var/run/${program_name}.pid" # File that allows the system to keep
|
||||
export HOME=$( getent passwd "homebrewery_runAs" | cut -d: -f6 ) # Gets the home directory of the runAs user
|
||||
|
||||
# Command Setup
|
||||
exec_cmd="/usr/local/homebrewery/server.js" # Path to the HomeBrewery server.js
|
||||
output_file="/var/log/${program_name}.log" # Path to HomeBrewery output file
|
||||
exec_cmd="${location}/${program_name}/server.js" # Path to the HomeBrewery server.js, /usr/local/bin/ when installed globally
|
||||
output_file="/var/log/${program_name}.log" # Path to HomeBrewery output file
|
||||
|
||||
# Command
|
||||
command="/usr/sbin/daemon"
|
||||
command_args="-r -t ${title} -u ${homebrewery_runAs} -o ${output_file} -P ${pidfile} /usr/local/bin/node ${exec_cmd} ${homebrewery_args}"
|
||||
|
||||
# Extra Commands
|
||||
extra_commands="dev_mode"
|
||||
|
||||
dev_mode_cmd="homebrewery_dev_mode"
|
||||
|
||||
homebrewery_dev_mode() {
|
||||
echo "Starting HomeBrewery in live rebuild Developer mode..."
|
||||
cd ${location}/${program_name}/
|
||||
/usr/local/bin/node ${location}/${program_name}/scripts/buildHomebrew.js --dev
|
||||
}
|
||||
|
||||
# Loading Config
|
||||
load_rc_config ${name}
|
||||
run_rc_command "$1"
|
||||
|
||||
Reference in New Issue
Block a user