Move configuration to /etc/aurweb/config

Since d4fe77a (Reorganize Git interface scripts, 2016-10-08), the key
components of the aurweb SSH interface are installed system-wide. Update
the default configuration path to point to a central location.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Lukas Fleischer 2016-10-17 15:01:45 +02:00
parent 9581069f49
commit 85866796a4
5 changed files with 7 additions and 6 deletions

1
.gitignore vendored
View file

@ -1,4 +1,3 @@
conf/config
dummy-data.sql* dummy-data.sql*
po/*.mo po/*.mo
po/*.po~ po/*.po~

View file

@ -30,8 +30,8 @@ Setup on Arch Linux
} }
} }
3) Copy conf/config.proto to conf/config and adjust the configuration (pay 3) Copy conf/config.proto to /etc/aurweb/config and adjust the configuration
attention to disable_http_login, enable_maintenance and aur_location). (pay attention to disable_http_login, enable_maintenance and aur_location).
4) Create a new MySQL database and a user and import the AUR SQL schema: 4) Create a new MySQL database and a user and import the AUR SQL schema:

View file

@ -12,8 +12,7 @@ def _get_parser():
if 'AUR_CONFIG' in os.environ: if 'AUR_CONFIG' in os.environ:
path = os.environ.get('AUR_CONFIG') path = os.environ.get('AUR_CONFIG')
else: else:
relpath = "/../conf/config" path = "/etc/aurweb/config"
path = os.path.dirname(os.path.realpath(__file__)) + relpath
_parser.read(path) _parser.read(path)
return _parser return _parser

3
upgrading/4.4.1.txt Normal file
View file

@ -0,0 +1,3 @@
1. The default configuration file search path now points to /etc/aurweb/config.
Make sure you copy your aurweb configuration to the new location before
upgrading.

View file

@ -4,7 +4,7 @@ function config_load() {
global $AUR_CONFIG; global $AUR_CONFIG;
if (!isset($AUR_CONFIG)) { if (!isset($AUR_CONFIG)) {
$AUR_CONFIG = parse_ini_file("../../conf/config", true, INI_SCANNER_RAW); $AUR_CONFIG = parse_ini_file("/etc/aurweb/config", true, INI_SCANNER_RAW);
} }
} }