-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathmkparameters
executable file
·66 lines (60 loc) · 4.73 KB
/
mkparameters
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/env php
<?php
require_once '/var/www/html/vendor/autoload.php';
$TEMPLATE_PATH = '/usr/local/bin';
$TEMPLATE_FILE = 'parameters.template';
$loader = new Twig_Loader_Filesystem($TEMPLATE_PATH);
$twig = new Twig_Environment($loader, array('cache' => '/tmp'));
$template = $twig->load($TEMPLATE_FILE);
$values = array(
'PARTKEEPR_AUTHENTICATION_PROVIDER' => getenv('PARTKEEPR_AUTHENTICATION_PROVIDER') ?: 'PartKeepr.Auth.WSSEAuthenticationProvider',
'PARTKEEPR_CACHE_DOCTRINE' => getenv('PARTKEEPR_CACHE_DOCTRINE') ?: 'array',
'PARTKEEPR_CACHE_DUNGLAS' => getenv('PARTKEEPR_CACHE_DUNGLAS') ?: False,
'PARTKEEPR_DATABASE_DRIVER' => getenv('PARTKEEPR_DATABASE_DRIVER') ?: 'pdo_mysql',
'PARTKEEPR_DATABASE_HOST' => getenv('PARTKEEPR_DATABASE_HOST') ?: 'database',
'PARTKEEPR_DATABASE_NAME' => getenv('PARTKEEPR_DATABASE_NAME') ?: 'partkeepr',
'PARTKEEPR_DATABASE_PORT' => getenv('PARTKEEPR_DATABASE_PORT') ?: 3306,
'PARTKEEPR_DATABASE_USER' => getenv('PARTKEEPR_DATABASE_USER') ?: 'partkeepr',
'PARTKEEPR_DATABASE_PASS' => getenv('PARTKEEPR_DATABASE_PASS') ?: 'partkeepr',
'PARTKEEPR_FR3D_LDAP_DRIVER_ACCOUNTCANONICALFORM' => getenv('PARTKEEPR_FR3D_LDAP_DRIVER_ACCOUNTCANONICALFORM') ?: NULL,
'PARTKEEPR_FR3D_LDAP_DRIVER_ACCOUNTDOMAINNAME' => getenv('PARTKEEPR_FR3D_LDAP_DRIVER_ACCOUNTDOMAINNAME') ?: NULL,
'PARTKEEPR_FR3D_LDAP_DRIVER_ACCOUNTDOMAINNAMESHORT' => getenv('PARTKEEPR_FR3D_LDAP_DRIVER_ACCOUNTDOMAINNAMESHORT') ?: NULL,
'PARTKEEPR_FR3D_LDAP_DRIVER_ACCOUNTFILTERFORMAT' => getenv('PARTKEEPR_FR3D_LDAP_DRIVER_ACCOUNTFILTERFORMAT') ?: NULL,
'PARTKEEPR_FR3D_LDAP_DRIVER_BASEDN' => getenv('PARTKEEPR_FR3D_LDAP_DRIVER_BASEDN') ?: NULL,
'PARTKEEPR_FR3D_LDAP_DRIVER_BINDREQUIRESDN' => getenv('PARTKEEPR_FR3D_LDAP_DRIVER_BINDREQUIRESDN') ?: False,
'PARTKEEPR_FR3D_LDAP_DRIVER_HOST' => getenv('PARTKEEPR_FR3D_LDAP_DRIVER_HOST') ?: '127.0.0.1',
'PARTKEEPR_FR3D_LDAP_DRIVER_OPTREFERRALS' => getenv('PARTKEEPR_FR3D_LDAP_DRIVER_OPTREFERRALS') ?: NULL,
'PARTKEEPR_FR3D_LDAP_DRIVER_PASSWORD' => getenv('PARTKEEPR_FR3D_LDAP_DRIVER_PASSWORD') ?: NULL,
'PARTKEEPR_FR3D_LDAP_DRIVER_PORT' => getenv('PARTKEEPR_FR3D_LDAP_DRIVER_PORT') ?: 389,
'PARTKEEPR_FR3D_LDAP_DRIVER_USESSL' => getenv('PARTKEEPR_FR3D_LDAP_DRIVER_USESSL') ?: False,
'PARTKEEPR_FR3D_LDAP_DRIVER_USESTARTTLS' => getenv('PARTKEEPR_FR3D_LDAP_DRIVER_USESTARTTLS') ?: False,
'PARTKEEPR_FR3D_LDAP_DRIVER_USERNAME' => getenv('PARTKEEPR_FR3D_LDAP_DRIVER_USERNAME') ?: NULL,
'PARTKEEPR_FR3D_LDAP_USER_ATTRIBUTE_EMAIL' => getenv('PARTKEEPR_FR3D_LDAP_USER_ATTRIBUTE_EMAIL') ?: 'email',
'PARTKEEPR_FR3D_LDAP_USER_ATTRIBUTE_USERNAME' => getenv('PARTKEEPR_FR3D_LDAP_USER_ATTRIBUTE_USERNAME') ?: 'samaccountname',
'PARTKEEPR_FR3D_LDAP_USER_BASEDN' => getenv('PARTKEEPR_FR3D_LDAP_USER_BASEDN') ?: 'dc=example,dc=com',
'PARTKEEPR_FR3D_LDAP_USER_ENABLED' => getenv('PARTKEEPR_FR3D_LDAP_USER_ENABLED') ?: False,
'PARTKEEPR_FR3D_LDAP_USER_FILTER' => getenv('PARTKEEPR_FR3D_LDAP_USER_FILTER') ?: NULL,
'PARTKEEPR_LOCALE' => getenv('PARTKEEPR_LOCALE') ?: 'en',
'PARTKEEPR_MAILER_AUTH_MODE' => getenv('PARTKEEPR_MAILER_AUTH_MODE') ?: NULL,
'PARTKEEPR_MAILER_ENCRYPTION' => getenv('PARTKEEPR_MAILER_ENCRYPTION') ?: NULL,
'PARTKEEPR_MAILER_HOST' => getenv('PARTKEEPR_MAILER_HOST') ?: NULL,
'PARTKEEPR_MAILER_PASSWORD' => getenv('PARTKEEPR_MAILER_PASSWORD') ?: NULL,
'PARTKEEPR_MAILER_PORT' => getenv('PARTKEEPR_MAILER_PORT') ?: 25,
'PARTKEEPR_MAILER_TRANSPORT' => getenv('PARTKEEPR_MAILER_TRANSPORT') ?: NULL,
'PARTKEEPR_MAILER_USER' => getenv('PARTKEEPR_MAILER_USER') ?: NULL,
'PARTKEEPR_AUTH_MAX_USERS' => getenv('PARTKEEPR_AUTH_MAX_USERS') ?: 'unlimited',
'PARTKEEPR_CATEGORY_PATH_SEPARATOR' => getenv('PARTKEEPR_CATEGORY_PATH_SEPARATOR') ?: ' ➤ ',
'PARTKEEPR_CRONJOB_CHECK' => getenv('PARTKEEPR_CRONJOB_CHECK') ?: True,
'PARTKEEPR_FILESYSTEM_DATA_DIRECTORY' => getenv('PARTKEEPR_FILESYSTEM_DATA_DIRECTORY') ?: '%kernel.root_dir%/../data/',
'PARTKEEPR_FILESYSTEM_QUOTA' => getenv('PARTKEEPR_FILESYSTEM_QUOTA') ?: False,
'PARTKEEPR_MAINTENANCE' => getenv('PARTKEEPR_MAINTENANCE') ?: false,
'PARTKEEPR_MAINTENANCE_MESSAGE' => getenv('PARTKEEPR_MAINTENANCE_MESSAGE') ?: NULL,
'PARTKEEPR_MAINTENANCE_TITLE' => getenv('PARTKEEPR_MAINTENANCE_TITLE') ?: NULL,
'PARTKEEPR_OCTOPART_APIKEY' => getenv('PARTKEEPR_OCTOPART_APIKEY') ?: NULL,
'PARTKEEPR_PARTS_INTERNALPARTNUMBERUNIQUE' => getenv('PARTKEEPR_PARTS_INTERNALPARTNUMBERUNIQUE') ?: False,
'PARTKEEPR_PARTS_LIMIT' => getenv('PARTKEEPR_PARTS_LIMIT') ?: False,
'PARTKEEPR_USERS_LIMIT' => getenv('PARTKEEPR_USERS_LIMIT') ?: False,
'PARTKEEPR_SECRET' => getenv('PARTKEEPR_SECRET') ?: 'OJBKOJIKNONAJENLBJJNLFIDPDGKDIED',
);
echo $template->render($values);
?>