containers-geminabox/geminabox.sh

19 lines
383 B
Bash
Raw Normal View History

2019-09-18 01:01:34 +00:00
#!/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