19 lines
383 B
Bash
19 lines
383 B
Bash
|
#!/bin/sh
|
||
|
set -e
|
||
|
|
||
|
dir=/srv/http/geminabox
|
||
|
pid=/tmp/geminabox.pid
|
||
|
|
||
|
chown -R app:www-data /srv/http
|
||
|
cd ${dir}
|
||
|
|
||
|
for link in Gemfile Gemfile.lock .bundle config.ru vendor; do
|
||
|
test -e ${link} && continue
|
||
|
ln -s ../${link} .
|
||
|
done
|
||
|
|
||
|
rm -f ${pid}
|
||
|
daemonize -p ${pid} -l ${pid} -o ${dir}/access.log -e ${dir}/error.log \
|
||
|
-c ${dir} -a -u app \
|
||
|
`which bundle` exec rackup
|