diff options
Diffstat (limited to 'debian/gnunet.postinst')
-rw-r--r-- | debian/gnunet.postinst | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/debian/gnunet.postinst b/debian/gnunet.postinst index d625ccfb6..bde8b1462 100644 --- a/debian/gnunet.postinst +++ b/debian/gnunet.postinst | |||
@@ -42,11 +42,8 @@ case "${1}" in | |||
42 | configure) | 42 | configure) |
43 | db_version 2.0 | 43 | db_version 2.0 |
44 | 44 | ||
45 | db_get gnunet-systempeer/username | 45 | _USERNAME="gnunet" |
46 | _USERNAME="${RET:-gnunet}" | 46 | _GROUPNAME="gnunet" |
47 | |||
48 | db_get gnunet-systempeer/groupname | ||
49 | _GROUPNAME="${RET:-gnunet}" | ||
50 | 47 | ||
51 | db_get gnunet-systempeer/autostart | 48 | db_get gnunet-systempeer/autostart |
52 | _AUTOSTART="${RET}" # boolean | 49 | _AUTOSTART="${RET}" # boolean |
@@ -169,8 +166,6 @@ case "${1}" in | |||
169 | # Update files and directories permissions. | 166 | # Update files and directories permissions. |
170 | # Assuming default values, this *should* not be changed. | 167 | # Assuming default values, this *should* not be changed. |
171 | echo -n "Updating files and directories permissions:" | 168 | echo -n "Updating files and directories permissions:" |
172 | chown ${_USERNAME}:${_GROUPNAME} /var/log/gnunetd | ||
173 | chown ${_USERNAME}:${_GROUPNAME} /var/log/gnunetd/* | ||
174 | # Secure access to the data directory | 169 | # Secure access to the data directory |
175 | chmod 0700 "${GNUNET_HOME}" || true | 170 | chmod 0700 "${GNUNET_HOME}" || true |
176 | # Restrict access on setuid binaries | 171 | # Restrict access on setuid binaries |
@@ -202,25 +197,6 @@ case "${1}" in | |||
202 | fi | 197 | fi |
203 | echo " done." | 198 | echo " done." |
204 | 199 | ||
205 | # Writing new values to configuration file | ||
206 | echo -n "Writing new configuration file:" | ||
207 | CONFIG_NEW=$(tempfile) | ||
208 | |||
209 | cat > "${CONFIG_NEW}" <<EOF | ||
210 | # This file controls the behaviour of the GNUnet init script. | ||
211 | # It will be parsed as a shell script. | ||
212 | # please do not edit by hand, use 'dpkg-reconfigure gnunet-systempeer'. | ||
213 | |||
214 | GNUNET_USER=${_USERNAME} | ||
215 | GNUNET_GROUP=${_GROUPNAME} | ||
216 | GNUNET_AUTOSTART="${_AUTOSTART}" | ||
217 | EOF | ||
218 | |||
219 | cp -f "${CONFIG_NEW}" "${CONFIG_FILE}" | ||
220 | echo " done." | ||
221 | |||
222 | # Cleaning | ||
223 | rm -f "${CONFIG_NEW}" | ||
224 | echo "All done." | 200 | echo "All done." |
225 | 201 | ||
226 | ;; | 202 | ;; |