containers-geminabox/geminabox.sh

20 lines
379 B
Bash
Raw Normal View History

2019-09-18 01:01:34 +00:00
#!/bin/sh
set -e
2019-09-18 13:19:36 +00:00
dir=/srv/gems
2019-09-18 01:01:34 +00:00
pid=/tmp/geminabox.pid
2019-12-20 21:49:10 +00:00
log=/tmp/geminabox.log
2019-09-18 01:01:34 +00:00
2019-09-18 13:46:57 +00:00
chown -R app:www-data ${dir}
2019-09-18 01:01:34 +00:00
cd ${dir}
for link in Gemfile Gemfile.lock .bundle config.ru vendor; do
test -e ${link} && continue
2019-09-18 13:19:36 +00:00
ln -s /srv/http/${link} .
2019-09-18 01:01:34 +00:00
done
rm -f ${pid}
2019-12-20 21:49:10 +00:00
daemonize -p ${pid} -l ${pid} -o ${log} -e ${log} \
2019-09-18 01:01:34 +00:00
-c ${dir} -a -u app \
`which bundle` exec rackup