This file is indexed.

/etc/init.d/firebird3.0 is in firebird3.0-server 3.0.2.32703.ds4-11ubuntu2.

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
#!/bin/sh

# This file belongs in /etc/init.d where it will be run
# on system startup and shutdown to start the
# Firebird database server daemon


# This init script contains functions specific for debian
# init scripts.

### BEGIN INIT INFO
# Provides:          firebird3.0
# Required-Start:    $remote_fs $syslog $named
# Required-Stop:     $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start firebird server
# Description:       Start the firebird guardian process (fbguard)
#                    which starts the actual firebird server process
#                    (fbserver) and makes sure there is always one running
### END INIT INFO


# Source LSB function library.
. /lib/lsb/init-functions

set -u

FB_VER="3.0"

FUNCTIONS="/usr/share/firebird${FB_VER}-common/functions.sh"
[ -e "$FUNCTIONS" ] || exit 0
. "$FUNCTIONS"

FBRunUser=firebird
PIDFILE="$RUN/firebird.pid"
FB_OPTS="-daemon -forever -pidfile $PIDFILE"
NAME="Firebird $FB_VER server"

# Check the guardian is there and is executable.
FBGUARD=/usr/sbin/fbguard
FBSERVER=/usr/sbin/firebird
[ -x $FBGUARD ] && [ -x $FBSERVER ] || exit 0

# workaround of splashy's #400598
# define RUNLEVEL to avoind unbound variable error
RUNLEVEL=${RUNLEVEL:-}

export FIREBIRD=/usr/lib/firebird/$FB_VER

# See how we were called.
case "${1:-}" in
    start)
    if pidof $FBGUARD > /dev/null; then
        log_success_msg "$NAME already running"
        RETVAL=0
    else
        log_action_begin_msg "Starting $NAME"
        create_var_run_firebird
        # remove stale pid file
        rm -f $PIDFILE
        start-stop-daemon --start --quiet --chuid $FBRunUser --pidfile $PIDFILE --exec $FBGUARD -- $FB_OPTS 2>&1 | ( grep -v 'server has been successfully started' || true )
        RETVAL=$?
        log_action_end_msg $RETVAL
    fi
    ;;

    stop)
    if pidof $FBGUARD > /dev/null; then
        log_action_begin_msg "Stopping $NAME"
	start-stop-daemon --stop --quiet --oknodo --retry 10 --exec $FBGUARD \
	    && \
	start-stop-daemon --stop --quiet --oknodo --retry 15 --exec $FBSERVER --pidfile $PIDFILE

        RETVAL=$?
        log_action_end_msg $RETVAL
    else
        log_success_msg "$NAME not running"
        RETVAL=0
    fi
    ;;

    restart|force-reload)
    $0 stop && $0 start
    RETVAL=$?
    ;;

    status)
    pidof $FBGUARD > /dev/null
    RETVAL=$?
    ;;

    *)
    echo "Usage: firebird {start|stop|restart|force-reload|status}"
    RETVAL=2
    ;;
esac

exit $RETVAL