diff options
author | Matsuu Takuto <matsuu@gentoo.org> | 2013-01-07 13:39:26 +0000 |
---|---|---|
committer | Matsuu Takuto <matsuu@gentoo.org> | 2013-01-07 13:39:26 +0000 |
commit | dbbb38cf09092833852a84e6a832f0faf8734c75 (patch) | |
tree | 233ccb72abd71a5cc877468e51d999335b47ce05 /www-apps/redmine/files | |
parent | Marked stable for amd64 wrt bug #449230 (diff) | |
download | gentoo-2-dbbb38cf09092833852a84e6a832f0faf8734c75.tar.gz gentoo-2-dbbb38cf09092833852a84e6a832f0faf8734c75.tar.bz2 gentoo-2-dbbb38cf09092833852a84e6a832f0faf8734c75.zip |
Version bumped, bug #418925.
(Portage version: 2.1.11.38/cvs/Linux x86_64, signed Manifest commit with key 05280D69)
Diffstat (limited to 'www-apps/redmine/files')
-rw-r--r-- | www-apps/redmine/files/redmine-2.initd | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/www-apps/redmine/files/redmine-2.initd b/www-apps/redmine/files/redmine-2.initd new file mode 100644 index 000000000000..e4aece87f935 --- /dev/null +++ b/www-apps/redmine/files/redmine-2.initd @@ -0,0 +1,45 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-apps/redmine/files/redmine-2.initd,v 1.1 2013/01/07 13:39:26 matsuu Exp $ + +RAILS_ENV=${RAILS_ENV:-production} +REDMINE_DIR=${REDMINE_DIR:-/var/lib/redmine} +REDMINE_ADDRESS=${REDMINE_ADDRESS:-localhost} +REDMINE_PORT=${REDMINE_PORT:-3000} +REDMINE_USER=${REDMINE_USER:-redmine} +REDMINE_GROUP=${REDMINE_GROUP:-redmine} +REDMINE_PIDFILE="${REDMINE_DIR}/tmp/pids/server.pid" + +depend() { + use apache2 git-daemon mysql net postgresql svnserve +} + +start_pre() { + if [ ! -e "${REDMINE_DIR}/config/initializers/secret_token.rb" ] ; then + eerror "Execute the following command to initlize environment:" + eerror + eerror "# emerge --config www-apps/redmine" + eerror + return 1 + fi +} + +start() { + ebegin "Starting redmine" + cd "${REDMINE_DIR}" + start-stop-daemon --start --quiet --user ${REDMINE_USER}:${REDMINE_GROUP} \ + --pidfile "${REDMINE_PIDFILE}" \ + --exec /usr/bin/ruby "${REDMINE_DIR}"/script/rails server -- \ + --daemon --environment=${RAILS_ENV} \ + --binding=${REDMINE_ADDRESS} --port=${REDMINE_PORT} \ + ${REDMINE_OPTS} + eend $? +} + +stop() { + ebegin "Stopping redmine" + cd "${REDMINE_DIR}" + start-stop-daemon --signal INT --quiet --pidfile "${REDMINE_PIDFILE}" + eend $? +} |