This file is indexed.

/etc/init.d/tryton-server-cron is in tryton-server 4.6.3-2.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  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
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
#!/bin/sh

### BEGIN INIT INFO
# Provides:             tryton-server-cron
# Required-Start:       $syslog $remote_fs
# Required-Stop:        $syslog $remote_fs
# Should-Start:         $network postgresql mysql
# Should-Stop:          $network postgresql mysql
# Default-Start:        2 3 4 5
# Default-Stop:         0 1 6
# Short-Description:    Application Platform
# Description:          Tryton is an Application Platform serving as a base for
#                       a complete ERP software. This service runs the cron job.
### END INIT INFO

PATH="/sbin:/bin:/usr/sbin:/usr/bin"
DAEMON="/usr/bin/trytond-cron"

test -x "${DAEMON}" || exit 0

BASENAME="trytond"
NAME="${BASENAME}-cron"
DESC="Tryton Application Platform"
DAEMONUSER="tryton"
PIDDIR="/var/run/${BASENAME}"
PIDFILE="${PIDDIR}/${NAME}.pid"
LOGCONF="/etc/tryton/${BASENAME}_log.conf"
DEFAULTS="/etc/default/tryton-server"
CONFIGFILE="/etc/tryton/${BASENAME}.conf"
DAEMON_OPTS="--config ${CONFIGFILE} --logconf ${LOGCONF} -d ${DATABASES}"

# Include tryton-server defaults if available
if [ -r "${DEFAULTS}" ]
then
	. "${DEFAULTS}"
fi

. /lib/lsb/init-functions

# Make sure trytond is started with configured locale
if [ -n "${LANG}" ]
then
	LANG="${LANG}"
	export LANG
fi

set -e

do_start ()
{
	if [ ! -d "${PIDDIR}" ]
	then
		mkdir -p "${PIDDIR}"
		chown "${DAEMONUSER}":"${DAEMONUSER}" "${PIDDIR}"
	fi

	start-stop-daemon --start --quiet --pidfile ${PIDFILE} \
		--chuid ${DAEMONUSER} --background --make-pidfile \
		--exec ${DAEMON} -- ${DAEMON_OPTS}
}

do_stop ()
{
	start-stop-daemon --stop --quiet --pidfile ${PIDFILE} --oknodo
}

case "${1}" in
	start)
		log_daemon_msg "Starting ${DESC}" "${NAME}"
		do_start
		log_end_msg ${?}
		;;

	stop)
		log_daemon_msg "Stopping ${DESC}" "${NAME}"
		do_stop
		log_end_msg ${?}
		;;

	restart|force-reload)
		log_daemon_msg "Restarting ${DESC}" "${NAME}"
		do_stop
		sleep 1
		do_start
		log_end_msg ${?}
	;;

	status)
		status_of_proc -p "${PIDFILE}" "${DAEMON}" "${NAME}" && \
		exit 0 || exit ${?}
	;;

	*)
		N="/etc/init.d/${NAME}"
		echo "Usage: ${N} {start|stop|restart|force-reload|status}" >&2
		exit 1
		;;
esac

exit 0