Skip to content

Commit

Permalink
Move configuration file back into reporitory
Browse files Browse the repository at this point in the history
Fix #29
  • Loading branch information
frdmn committed Sep 20, 2016
1 parent ff05a81 commit 6813434
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,4 +1,5 @@
### servant ###
config.json
.vagrant
public/*
!public/.gitkeep
Expand Down
10 changes: 5 additions & 5 deletions Vagrantfile
Expand Up @@ -16,17 +16,17 @@
###

# Set path for conf file
configuration_filename = "~/.servant.json"
configuration_filename = File.join(File.dirname(__FILE__), 'config.json')

# Check if configration file exists
if File.exist?(File.expand_path configuration_filename)
if File.exist?(configuration_filename)
# Store settings
configuration = JSON.parse(File.read(File.expand_path configuration_filename))
configuration = JSON.parse(File.read(configuration_filename))
else
# Return usage information and exit
sample = File.join(File.dirname(__FILE__), 'config.json')
sample = File.join(File.dirname(__FILE__), 'config.sample.json')
puts "Error: No config file found (#{configuration_filename}). To apply the default configuration:\n\n"
puts " cp #{sample} ~/.servant.json"
puts " cp #{sample} #{configuration_filename}"
# Exit with error code
exit 1
end
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/configuration.rst
Expand Up @@ -3,7 +3,7 @@
Configuration file
==================

To provide some basic customization, you can edit your user config file ``~/.servant.json``. A sample configuration file is available in the source repository as ``config.json``.
To provide some basic customization, you can edit your config file ``config.json`` within the **servant** root folder. A sample configuration file is available in the same directory as ``config.sample.json``.

**Caution**: If you change the configuration and want to apply the changes you need to destroy and recreate the **servant** machine up from scratch. This means you loose your SQL databases so make sure to dump them before!

Expand Down

0 comments on commit 6813434

Please sign in to comment.