mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-17 03:36:22 +00:00
25 lines
430 B
Bash
25 lines
430 B
Bash
|
#!/bin/sh
|
||
|
set -e
|
||
|
export RAILS_ENV=production
|
||
|
|
||
|
case $1 in
|
||
|
rails)
|
||
|
cd /srv/http
|
||
|
bundle exec rake db:migrate
|
||
|
bundle exec rake db:seed
|
||
|
bundle exec puma -d config.ru
|
||
|
exit $?
|
||
|
;;
|
||
|
darkhttpd)
|
||
|
darkhttpd /srv/http/public \
|
||
|
--no-server-id \
|
||
|
--pidfile /tmp/darkhttpd.pid \
|
||
|
--uid darkhttpd \
|
||
|
--gid www-data \
|
||
|
--no-listing \
|
||
|
--daemon \
|
||
|
--port 8080
|
||
|
exit $?
|
||
|
;;
|
||
|
esac
|