aboutsummaryrefslogtreecommitdiff
path: root/audio/ampache/files/500.ampache-cron.in
blob: f131030553562591c4fae1a8d42f287ba6e69783 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh -
#
# $FreeBSD$
#

if [ -r /etc/defaults/periodic.conf ]; then
	. /etc/defaults/periodic.conf
	source_periodic_confs
fi

rc=0

case "${daily_ampache_gc_enable:-no}" in
[Nn][Oo])
	;;
*)
	phpcmd=%%LOCALBASE%%/bin/php
	cronscript=%%WWWDIR%%/bin/cron.inc

	if ! $phpcmd $cronscript >/dev/null 2>&1 ; then
		echo 'ampache cron script failed- try running it manually'
		rc=2
	fi
	;;
esac

exit $rc