You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
container-overlay/profiles/templates/mastodon/mastodon/init.mastodon-web

30 lines
790 B

# Calculate path=/etc/init.d name=#-cut(1,.)-# chmod=755 comment=# exists(/var/calculate/www/mastodon/.node-live)!=
#!/sbin/openrc-run
name="Mastodon Web daemon"
description=""
pidfile=/run/mastodon-web.pid
extra_commands="reload"
command_user=mastodon
output_log=/var/log/mastodon-web.log
error_log=/var/log/mastodon-web.log
directory=/var/calculate/www/mastodon/live
start_stop_daemon_args="-e RAILS_ENV=production -e PORT=3000"
command=/var/calculate/www/mastodon/.rbenv/shims/bundle
command_args="exec puma -C config/puma.rb"
command_background=true
depend() {
need nginx postgresql
need mastodon-streaming mastodon-sidekiq
}
start_pre() {
checkpath -f -o mastodon -m 0600 /var/log/mastodon-web.log
}
reload() {
einfo "Reload $name"
kill -USR1 $(cat $pidfile)
}