Sha256: b9ed98cca9fc850f214294e85ed786167143d948beec16fa7b9a776175cd0656
Contents?: true
Size: 1.15 KB
Versions: 9
Compression:
Stored size: 1.15 KB
Contents
#!/bin/bash ### BEGIN INIT INFO # Provides: <%= name %> # Required-Start: $remote_fs $syslog $nginx # Required-Stop: $remote_fs $syslog $nginx # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 ### END INIT INFO RUBY_HEAP_MIN_SLOTS=800000 RUBY_HEAP_FREE_MIN=100000 RUBY_HEAP_SLOTS_INCREMENT=300000 RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 RUBY_GC_MALLOC_LIMIT=79000000 PID_FILE="<%= pid_file %>" <% unless user.nil? %> exec 1>><%= log_file %> 2>&1 if [[ "$(id -u)" != "$(id -u <%= user %>)" ]] ; then touch <%= log_file %> $PID_FILE chown <%= user %> <%= log_file %> $PID_FILE exec su - <%= user %> $0 $* fi <% end %> [[ -f '<%= shared_path.join(".env") %>' ]] && source '<%= shared_path.join(".env") %>' function start() { cd <%= working_dir %> nohup <%= start_cmd %> >><%= log_file %> 2>&1 & if [[ $? -eq 0 ]]; then echo $! > $PID_FILE else exit 1 fi } function stop() { cd <%= working_dir %> <%= stop_cmd %> } case $1 in start) start ;; stop) stop ;; reload) <%= reload_cmd %> ;; restart) stop start ;; *) echo "$0: <start|stop|restart|reload>" exit 1 ;; esac
Version data entries
9 entries across 9 versions & 1 rubygems