Lines 14-19
Link Here
|
14 |
# postgresql_flags="-w -s -m fast" |
14 |
# postgresql_flags="-w -s -m fast" |
15 |
# postgresql_initdb_flags="--encoding=utf-8 --lc-collate=C" |
15 |
# postgresql_initdb_flags="--encoding=utf-8 --lc-collate=C" |
16 |
# postgresql_class="default" |
16 |
# postgresql_class="default" |
|
|
17 |
# postgresql_fib="NONE" |
17 |
# postgresql_profiles="" |
18 |
# postgresql_profiles="" |
18 |
# |
19 |
# |
19 |
# See %%PREFIX%%/share/doc/postgresql/README-server for more info |
20 |
# See %%PREFIX%%/share/doc/postgresql/README-server for more info |
Lines 37-42
Link Here
|
37 |
eval postgresql_data=${postgresql_data:-"~${postgresql_user}/data"} |
38 |
eval postgresql_data=${postgresql_data:-"~${postgresql_user}/data"} |
38 |
postgresql_class=${postgresql_class:-"default"} |
39 |
postgresql_class=${postgresql_class:-"default"} |
39 |
postgresql_initdb_flags=${postgresql_initdb_flags:-"--encoding=utf-8 --lc-collate=C"} |
40 |
postgresql_initdb_flags=${postgresql_initdb_flags:-"--encoding=utf-8 --lc-collate=C"} |
|
|
41 |
postgresql_fib=${postgresql_fib:-"NONE"} |
40 |
|
42 |
|
41 |
name=postgresql |
43 |
name=postgresql |
42 |
rcvar=postgresql_enable |
44 |
rcvar=postgresql_enable |
Lines 62-67
Link Here
|
62 |
eval postgresql_data="\${postgresql_${profile}_data:-${postgresql_data}}" |
64 |
eval postgresql_data="\${postgresql_${profile}_data:-${postgresql_data}}" |
63 |
eval postgresql_flags="\${postgresql_${profile}_flags:-${postgresql_flags}}" |
65 |
eval postgresql_flags="\${postgresql_${profile}_flags:-${postgresql_flags}}" |
64 |
eval postgresql_initdb_flags="\${postgresql_${profile}_initdb_flags:-${postgresql_initdb_flags}}" |
66 |
eval postgresql_initdb_flags="\${postgresql_${profile}_initdb_flags:-${postgresql_initdb_flags}}" |
|
|
67 |
eval postgresql_fib="\${postgresql_${profile}_fib:-${postgresql_fib}}" |
65 |
fi |
68 |
fi |
66 |
else |
69 |
else |
67 |
if [ "x${postgresql_profiles}" != "x" -a "x$1" != "x" ]; then |
70 |
if [ "x${postgresql_profiles}" != "x" -a "x$1" != "x" ]; then |
Lines 103-114
Link Here
|
103 |
|
106 |
|
104 |
postgresql_command() |
107 |
postgresql_command() |
105 |
{ |
108 |
{ |
106 |
su -l ${postgresql_user} -c "exec ${command} ${command_args} ${rc_arg}" |
109 |
case "$postgresql_fib" in |
|
|
110 |
[Nn][Oo][Nn][Ee]) |
111 |
;; |
112 |
*) |
113 |
command="setfib -F ${postgresql_fib} ${command}" |
114 |
;; |
115 |
esac |
116 |
|
117 |
su -l ${postgresql_user} -c "exec ${command} ${command_args} ${rc_arg}" |
107 |
} |
118 |
} |
108 |
|
119 |
|
109 |
postgresql_initdb() |
120 |
postgresql_initdb() |
110 |
{ |
121 |
{ |
111 |
su -l -c ${postgresql_class} ${postgresql_user} -c "exec %%PREFIX%%/bin/initdb ${postgresql_initdb_flags} -D ${postgresql_data} -U ${postgresql_user}" |
122 |
su -l -c ${postgresql_class} ${postgresql_user} -c "exec %%PREFIX%%/bin/initdb ${postgresql_initdb_flags} -D ${postgresql_data} -U ${postgresql_user}" |
112 |
} |
123 |
} |
113 |
|
124 |
|
114 |
run_rc_command "$1" |
125 |
run_rc_command "$1" |