Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # PROVIDE: mastodon
- # REQUIRE: LOGIN
- # BEFORE: securelevel
- # KEYWORD: shutdown
- # Add the following line to /etc/rc.conf to enable `mastodon':
- #
- #mastodon_enable="YES"
- export PATH="/usr/local/bin:/bin:/usr/bin"
- . /etc/rc.subr
- name="mastodon"
- rcvar="${name}_enable"
- load_rc_config "$name"
- : ${mastodon_enable="NO"}
- : ${mastodon_path="/usr/local/www/mastodon"}
- : ${mastodon_env="production"}
- start_cmd=${name}_start
- stop_cmd=${name}_stop
- mastodon_start() {
- export RAILS_ENV=$mastodon_env
- cd $mastodon_path
- bundle exec rails server puma
- }
- mastodon_stop() {
- kill `cat $mastodon_path/tmp/pids/puma.pid`
- }
- run_rc_command "$1"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement