debian: in postinst only generate secret if none exists
This commit is contained in:
parent
4023a55b54
commit
e9a2e2f02d
|
@ -32,9 +32,11 @@ case "$1" in
|
||||||
chown $WCSINSTD_USER:$WCSINSTD_GROUP $WCSINSTD_HOME/media $WCSINSTD_HOME/templates
|
chown $WCSINSTD_USER:$WCSINSTD_GROUP $WCSINSTD_HOME/media $WCSINSTD_HOME/templates
|
||||||
# echo -n "Initializing sqlite database.."
|
# echo -n "Initializing sqlite database.."
|
||||||
# $WCSINSTD_INIT manage syncdb --migrate
|
# $WCSINSTD_INIT manage syncdb --migrate
|
||||||
echo -n "Generating secret.."
|
if [ ! -f /etc/$NAME/secret ]; then
|
||||||
dd if=/dev/random ibs=1 count=32 2>/dev/null >/etc/$NAME/secret
|
echo -n "Generating secret.."
|
||||||
echo "..done"
|
dd if=/dev/random ibs=1 count=32 2>/dev/null >/etc/$NAME/secret
|
||||||
|
echo "..done"
|
||||||
|
fi
|
||||||
echo -n "Generating static files.."
|
echo -n "Generating static files.."
|
||||||
$WCSINSTD_INIT manage collectstatic --noinput --link
|
$WCSINSTD_INIT manage collectstatic --noinput --link
|
||||||
echo "..done"
|
echo "..done"
|
||||||
|
|
Reference in New Issue