#! /bin/sh
#
# This file is part of DisOrder
-# Copyright (C) 2004 Richard Kettlewell
+# Copyright (C) 2004, 2007 Richard Kettlewell
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
add_jukebox_user
fi
if test ! -f /etc/disorder/config.private; then
- # pwgen in debian stable has insane exit status
- set +e
rootpw=`pwgen 16 1`
webpw=`pwgen 16 1`
- set -e
if test -z "$rootpw" || test -z "$webpw"; then
+ # We used to ignore the exit status of pwgen due to a bug in an old
+ # version of Debian. That bug seems to be gone, but this check is
+ # harmless and could catch future bugs.
echo "$0: pwgen failed" 1>&2
exit 1
fi
+ # We set the umask so that private files aren't transiently world-readable
u=`umask`
umask 077
chown jukebox:jukebox /var/lib/disorder
configure_init_d
restart_server
- if test ! -e /etc/disorder/http.users; then
- touch /etc/disorder/http.users
- fi
db_stop
- ldconfig -n /usr/lib
;;
abort-upgrade )
/etc/init.d/disorder restart