From 5db5ee5c13e577e862e822501b2e4863fbd63195 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 29 Apr 2016 08:09:47 +0000 Subject: move community/redmine to unmaintained --- unmaintained/redmine/redmine.post-install | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 unmaintained/redmine/redmine.post-install (limited to 'unmaintained/redmine/redmine.post-install') diff --git a/unmaintained/redmine/redmine.post-install b/unmaintained/redmine/redmine.post-install new file mode 100644 index 0000000000..f68632c78e --- /dev/null +++ b/unmaintained/redmine/redmine.post-install @@ -0,0 +1,29 @@ +#!/bin/sh + +tokenfile=/var/lib/redmine/secret_token.rb +if [ -e $tokenfile ]; then + exit 0 +fi + +if [ -e /dev/urandom ] && [ -x /usr/bin/hexdump ]; then + token=$(/usr/bin/hexdump -n 32 -v -e '/1 "%02x"' /dev/urandom) +else + token=$(for i in $(seq 0 31); do echo $RANDOM; done | sha1sum | awk '{print $1}') +fi + +umask 027 +cat >$tokenfile<