-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_settings.sh
More file actions
70 lines (58 loc) · 2.53 KB
/
create_settings.sh
File metadata and controls
70 lines (58 loc) · 2.53 KB
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
67
68
69
70
#!/bin/bash
DOLLAR='$'
cat > Settings.php << EOF
<?php
/**
* Simple Machines Forum (SMF)
*
* @package SMF
* @author Simple Machines http://www.simplemachines.org
* @copyright 2011 Simple Machines
* @license http://www.simplemachines.org/about/smf/license.php BSD
*
* @version 2.0
*/
########## Maintenance ##########
# Note: If ${DOLLAR}maintenance is set to 2, the forum will be unusable! Change it to 0 to fix it.
${DOLLAR}maintenance = $MAINTENANCE;
${DOLLAR}mtitle = 'Maintenance Mode'; # Title for the Maintenance Mode message.
${DOLLAR}mmessage = '$MAINTENANCE_MESSAGE'; # Description of why the forum is in maintenance mode.
########## Forum Info ##########
${DOLLAR}mbname = 'VATUSA Forums'; # The name of your forum.
${DOLLAR}language = 'english'; # The default language file set for the forum.
${DOLLAR}boardurl = '$URL'; # URL to your forum's folder. (without the trailing /!)
${DOLLAR}webmaster_email = 'vatusa12@vatusa.net'; # Email address to send emails from. (like noreply@yourdomain.com.)
${DOLLAR}cookiename = '$COOKIE'; # Name of the cookie to set for authentication.
########## Database Info ##########
${DOLLAR}db_type = 'mysql';
${DOLLAR}db_server = '$DB_HOST';
${DOLLAR}db_name = '$DB_DATABASE';
${DOLLAR}db_user = '$DB_USERNAME';
${DOLLAR}db_passwd = '$DB_PASSWORD';
${DOLLAR}db_port = '$DB_PORT';
${DOLLAR}ssi_db_user = '';
${DOLLAR}ssi_db_passwd = '';
${DOLLAR}db_prefix = 'smf_';
${DOLLAR}db_persist = 0;
${DOLLAR}db_error_send = 0;
########## Directories/Files ##########
# Note: These directories do not have to be changed unless you move things.
${DOLLAR}boarddir = '/www'; # The absolute path to the forum's folder. (not just '.'!)
${DOLLAR}sourcedir = '/www/Sources'; # Path to the Sources directory.
${DOLLAR}cachedir = '/www/cache'; # Path to the cache directory.
########## Error-Catching ##########
# Note: You shouldn't touch these settings.
${DOLLAR}db_last_error = 0;
# Make sure the paths are correct... at least try to fix them.
if (!file_exists(${DOLLAR}boarddir) && file_exists(dirname(__FILE__) . '/agreement.txt'))
${DOLLAR}boarddir = dirname(__FILE__);
if (!file_exists(${DOLLAR}sourcedir) && file_exists(${DOLLAR}boarddir . '/Sources'))
${DOLLAR}sourcedir = ${DOLLAR}boarddir . '/Sources';
if (!file_exists(${DOLLAR}cachedir) && file_exists(${DOLLAR}boarddir . '/cache'))
${DOLLAR}cachedir = ${DOLLAR}boarddir . '/cache';
${DOLLAR}image_proxy_secret = '';
${DOLLAR}image_proxy_maxsize = '';
${DOLLAR}image_proxy_enabled = 0;
${DOLLAR}auth_secret = '${FORUM_AUTH_SECRET}';
EOF
echo $FORUM_KEY > forum.key