mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-04 21:12:41 +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
|
# General Info
|
||||||
name="homebrewery" # Safe name of program
|
name="homebrewery" # Safe name of program
|
||||||
|
location="/usr/local/" # Install location
|
||||||
program_name="homebrewery" # Name of exec
|
program_name="homebrewery" # Name of exec
|
||||||
title="HomeBrewery" # Title to display in top/htop
|
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
|
export HOME=$( getent passwd "homebrewery_runAs" | cut -d: -f6 ) # Gets the home directory of the runAs user
|
||||||
|
|
||||||
# Command Setup
|
# Command Setup
|
||||||
exec_cmd="/usr/local/homebrewery/server.js" # Path to the HomeBrewery server.js
|
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
|
output_file="/var/log/${program_name}.log" # Path to HomeBrewery output file
|
||||||
|
|
||||||
# Command
|
# Command
|
||||||
command="/usr/sbin/daemon"
|
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}"
|
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
|
# Loading Config
|
||||||
load_rc_config ${name}
|
load_rc_config ${name}
|
||||||
run_rc_command "$1"
|
run_rc_command "$1"
|
||||||
|
|||||||
Reference in New Issue
Block a user