Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 563580 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/www-apps/otrs/otrs-4.0.13.ebuild (-6 / +18 lines)
Lines 4-10 Link Here
4
4
5
EAPI=5
5
EAPI=5
6
6
7
inherit eutils confutils user
7
inherit eutils confutils user systemd
8
8
9
DESCRIPTION="OTRS is an Open source Ticket Request System"
9
DESCRIPTION="OTRS is an Open source Ticket Request System"
10
HOMEPAGE="http://otrs.org/"
10
HOMEPAGE="http://otrs.org/"
Lines 76-82 Link Here
76
		xargs sed -i -e "s:/opt/otrs:${OTRS_HOME}:g" \
76
		xargs sed -i -e "s:/opt/otrs:${OTRS_HOME}:g" \
77
		|| die "sed failed"
77
		|| die "sed failed"
78
78
79
	cd Kernel/Config/ || die
79
	cd Kernel/ || die
80
	for i in *.dist; do
80
	for i in *.dist; do
81
		cp ${i} $(basename ${i} .dist) || die
81
		cp ${i} $(basename ${i} .dist) || die
82
	done
82
	done
Lines 107-112 Link Here
107
		keepdir "${OTRS_HOME}/var/${a}"
107
		keepdir "${OTRS_HOME}/var/${a}"
108
	done
108
	done
109
	doenvd "${T}/50${PN}"
109
	doenvd "${T}/50${PN}"
110
111
	systemd_dounit "${FILESDIR}/otrs-daemon.service"
112
113
}
114
115
# This is too automagic, either einfo telling user or installing to /etc/cron.d/ should be preferred
116
pkg_config() {
117
	einfo "Installing cronjobs"
118
	crontab -u otrs /usr/share/doc/${PF}/crontab
110
}
119
}
111
120
112
pkg_postinst() {
121
pkg_postinst() {
Lines 117-131 Link Here
117
		|| die "Could not set permissions"
126
		|| die "Could not set permissions"
118
127
119
	einfo "Rebuilding config ..."
128
	einfo "Rebuilding config ..."
120
	/usr/bin/env perl "${OTRS_HOME}"/bin/otrs.RebuildConfig.pl \
129
	sudo -u otrs /usr/bin/env perl "${OTRS_HOME}"/bin/otrs.Console.pl Maint::Config::Rebuild \
121
		|| die "Could not rebuild config"
130
	|| die "Could not rebuild config"
122
131
123
	einfo "Deleting cache ..."
132
	einfo "Deleting cache ..."
124
	/usr/bin/env perl "${OTRS_HOME}"/bin/otrs.DeleteCache.pl \
133
	sudo -u otrs /usr/bin/env perl "${OTRS_HOME}"/bin/otrs.Console.pl Maint::Cache::Delete \
125
		|| die "Could not delete cache"
134
	|| die "Could not delete cache"
126
135
127
	einfo "Installation done!"
136
	einfo "Installation done!"
128
137
129
	elog "Enable cronjobs with the following command:"
138
	elog "Enable cronjobs with the following command:"
130
	elog "crontab -u otrs crontab"
139
	elog "crontab -u otrs crontab"
140
	elog "systemd users: enable and start OTRS daemon ->"
141
	elog "systemctl enable otrs-daemon"
142
	elog "systemctl start otrs-daemon"
131
}
143
}

Return to bug 563580