Revision 2d2cd458
Von Moritz Bunkus vor mehr als 13 Jahren hinzugefügt
DEBIAN/DEBIAN/postinst | ||
---|---|---|
77 | 77 |
|
78 | 78 |
|
79 | 79 |
set_lx_office_erp_web_admin_password() { |
80 |
|
|
81 | 80 |
db_get lx-office-erp/admin-password |
82 | 81 |
ADMINPASSWORD="$RET" |
83 | 82 |
|
84 |
cat /etc/lx-office-erp/lx_office.conf | \ |
|
85 |
sed --expression "s/{admin_password} = /{admin_password} = $ADMINPASSWORD/g" \ |
|
86 |
> /tmp/1.txt |
|
87 |
|
|
88 |
mv /tmp/1.txt /etc/lx-office-erp/lx_office.conf |
|
89 |
|
|
83 |
sed --in-place --expression "s/^admin_password.*=.*/admin_password = $ADMINPASSWORD/" /etc/lx-office-erp/lx_office.conf |
|
90 | 84 |
} |
91 | 85 |
|
92 | 86 |
|
... | ... | |
94 | 88 |
db_get lx-office-erp/lx-office-erp-user-postgresql-password |
95 | 89 |
PASSWORD="$RET" |
96 | 90 |
|
97 |
cat /etc/lx-office-erp/lx_office.conf | \ |
|
98 |
sed --expression "s/'password' = /'password' = $PASSWORD/g" \ |
|
99 |
> /tmp/1.txt |
|
100 |
|
|
101 |
cat /tmp/1.txt | \ |
|
102 |
sed --expression "s/^user = postgres/user = lxoffice/g" \ |
|
103 |
> /etc/lx-office-erp/lx_office.conf |
|
104 |
|
|
91 |
sed --in-place --expression "s/^password.*=.*/password = $PASSWORD/" /etc/lx-office-erp/lx_office.conf |
|
92 |
sed --in-place --expression "s/^user.*=.*postgres/user = lxoffice/g" /etc/lx-office-erp/lx_office.conf |
|
105 | 93 |
} |
106 | 94 |
|
107 | 95 |
|
Auch abrufbar als: Unified diff
Falsche sed-Anweisungen matchen nicht; keine temporären Dateien mit vorhersagbarem Namen