run.sh is startable from any location again
parent
4e0cf8a0c3
commit
43712c4cef
14
bin/run.sh
14
bin/run.sh
|
@ -1,5 +1,14 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
#Move to the folder where ep-lite is installed
|
||||||
|
FOLDER=$(dirname $(readlink -f $0))
|
||||||
|
cd $FOLDER
|
||||||
|
|
||||||
|
#Was this script started in the bin folder? if yes move out
|
||||||
|
if [ -d "../bin" ]; then
|
||||||
|
cd "../"
|
||||||
|
fi
|
||||||
|
|
||||||
#Stop the script if its started as root
|
#Stop the script if its started as root
|
||||||
if [[ $EUID -eq 0 ]]; then
|
if [[ $EUID -eq 0 ]]; then
|
||||||
echo "You shouldn't start Etherpad-Lite as root!" 1>&2
|
echo "You shouldn't start Etherpad-Lite as root!" 1>&2
|
||||||
|
@ -19,11 +28,6 @@ type -P npm &>/dev/null || {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
#Was this script started in the bin folder? if yes move out
|
|
||||||
if [ -d "../bin" ]; then
|
|
||||||
cd "../"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#Does a settings.json exist? if no copy the template
|
#Does a settings.json exist? if no copy the template
|
||||||
if [ ! -f "settings.json" ]; then
|
if [ ! -f "settings.json" ]; then
|
||||||
echo "Copy the settings template to settings.json..."
|
echo "Copy the settings template to settings.json..."
|
||||||
|
|
Loading…
Reference in New Issue