pad.pub0.org/bin/run.sh

28 lines
590 B
Bash
Raw Normal View History

2011-04-07 13:51:46 +00:00
#!/bin/bash
2011-03-26 13:10:41 +00:00
#Move to the folder where ep-lite is installed
FOLDER=$(dirname $(readlink -f $0))
cd $FOLDER
2011-04-07 13:51:46 +00:00
if [[ $EUID -eq 0 ]]; then
echo "You shouldn't start Etherpad-Lite as root!" 1>&2
echo "Use authbind if you want to use a port lower than 1024 -> http://en.wikipedia.org/wiki/Authbind" 1>&2
exit 1
fi
2011-03-26 13:10:41 +00:00
2011-04-07 13:51:46 +00:00
type -P node &>/dev/null || {
echo "You need to install node to run Etherpad-Lite!" >&2
exit 1
}
2011-03-26 13:10:41 +00:00
if [ -d "../bin" ]; then
cd "../"
fi
2011-06-02 11:15:02 +00:00
if [ ! -f "settings.json" ]; then
cp settings.json.template settings.json
fi
cd "node"
2011-04-07 13:51:46 +00:00
node server.js