mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-24 17:36:14 -04:00
Allow settings filename to be passed as a cli option
This commit is contained in:
parent
10cbb485fb
commit
8bac77ff80
4 changed files with 58 additions and 8 deletions
|
@ -40,10 +40,18 @@ if [ ! $(echo $NODE_VERSION | cut -d "." -f 1-2) = "v0.6" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
#Does a settings.json exist? if no copy the template
|
||||
if [ ! -f "settings.json" ]; then
|
||||
echo "Copy the settings template to settings.json..."
|
||||
cp -v settings.json.template settings.json || exit 1
|
||||
#Get the name of the settings file
|
||||
settings="settings.json"
|
||||
a='';
|
||||
for arg in $*; do
|
||||
if [ "$a" = "--settings" ] || [ "$a" = "-s" ]; then settings=$arg; fi
|
||||
a=$arg
|
||||
done
|
||||
|
||||
#Does a $settings exist? if no copy the template
|
||||
if [ ! -f $settings ]; then
|
||||
echo "Copy the settings template to $settings..."
|
||||
cp -v settings.json.template $settings || exit 1
|
||||
fi
|
||||
|
||||
echo "Ensure that all dependencies are up to date..."
|
||||
|
|
|
@ -21,9 +21,9 @@ if [ "$(id -u)" -eq 0 ]; then
|
|||
fi
|
||||
|
||||
#prepare the enviroment
|
||||
bin/installDeps.sh || exit 1
|
||||
bin/installDeps.sh $* || exit 1
|
||||
|
||||
#Move to the node folder and start
|
||||
echo "start..."
|
||||
cd "node"
|
||||
node server.js
|
||||
node server.js $*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue