-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmep
executable file
·36 lines (30 loc) · 948 Bytes
/
mep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
SHOW_LOGO=true
PERFORMANCE=false
PERFORMANCE_PREFIX=
INTERACTIVE=false
for arg in $@; do
# Turn on performance if there is `-p` or `--performance` flag
if [ ${arg} = "-p" ] || [ ${arg} = "--performance" ]; then
PERFORMANCE=true
fi
done
# Generated with `figlet`
if [ $SHOW_LOGO = true ]; then
echo " __ __ _ _"
echo "| \/ | ___ _ __ ___ _ __(_)___| |_ ___ _ __"
echo "| |\/| |/ _ \ |_ _ \| |__| / __| __/ _ \| __|"
echo "| | | | __/ | | | | | | | \__ \ || (_) | |"
echo "|_| |_|\___|_| |_| |_|_| |_|___/\__\___/|_| @2016-2017"
echo ""
fi
# Apply performance improvements
if [ $PERFORMANCE = true ]; then
export NODE_ENV=production
if [ "$EUID" -ne 0 ]; then
echo "Please run as root to turn on process privileges"
else
PERFORMANCE_PREFIX="nice -n -20 "
fi
fi
${PERFORMANCE_PREFIX} node --nolazy src/Bootstrap.js "$@"