Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hub
overleaf
Commits
c2ebfcc2
Commit
c2ebfcc2
authored
Aug 19, 2014
by
James Allen
Browse files
Generate Secret keys properly and start services on boot
parent
94ce0d37
Changes
3
Hide whitespace changes
Inline
Side-by-side
Gruntfile.coffee
View file @
c2ebfcc2
...
...
@@ -415,9 +415,9 @@ module.exports = (grunt) ->
after_install_script
=
"""
#!/bin/sh
# Create random secret keys
sed -i "s/CRYPTO_RANDOM/$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 64 | head -n 1)/" /etc/sharelatex/settings.coffee
sed -i "s/CRYPTO_RANDOM/$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 64 | head -n 1)/" /etc/sharelatex/settings.coffee
# Create random secret keys
(twice, once for http auth pass, once for cookie secret).
sed -i "
0,/CRYPTO_RANDOM/
s/CRYPTO_RANDOM/$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 64 | head -n 1)/" /etc/sharelatex/settings.coffee
sed -i "
0,/CRYPTO_RANDOM/
s/CRYPTO_RANDOM/$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 64 | head -n 1)/" /etc/sharelatex/settings.coffee
sudo adduser --system --group --home /var/www/sharelatex --no-create-home sharelatex
...
...
Vagrantfile
View file @
c2ebfcc2
...
...
@@ -9,6 +9,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config
.
vm
.
box_url
=
"http://files.vagrantup.com/precise64.box"
config
.
vm
.
network
:forwarded_port
,
guest:
3000
,
host:
3000
config
.
vm
.
network
:forwarded_port
,
guest:
80
,
host:
8080
config
.
ssh
.
forward_agent
=
true
...
...
package/upstart/sharelatex-template
View file @
c2ebfcc2
description "sharelatex-web"
author "ShareLaTeX <team@sharelatex.com>"
start on
started mountall
start on
(local-filesystems and net-device-up IFACE!=lo)
stop on shutdown
respawn
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment