This file is indexed.

/etc/init.d/ufw is in ufw 0.33-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
#!/bin/sh

### BEGIN INIT INFO
# Provides:          ufw
# Required-Start:    $local_fs
# Required-Stop:     $local_fs
# Default-Start:     S
# Default-Stop:      1
# Short-Description: start firewall
### END INIT INFO

set -e

PATH="/sbin:/bin"

[ -d /lib/ufw ] || exit 0

. /lib/lsb/init-functions

for s in "/lib/ufw/ufw-init-functions" "/etc/ufw/ufw.conf" "/etc/default/ufw" ; do
    if [ -s "$s" ]; then
        . "$s"
    else
        log_failure_msg "Could not find $s (aborting)"
        exit 1
    fi
done

error=0
case "$1" in
start)
    if [ "$ENABLED" = "yes" ] || [ "$ENABLED" = "YES" ]; then
        log_action_begin_msg "Starting firewall:" "ufw"
        output=`ufw_start` || error="$?"
        if [ "$error" = "0" ]; then
            log_action_cont_msg "Setting kernel variables ($IPT_SYSCTL)"
        fi
        if [ ! -z "$output" ]; then
            echo "$output" | while read line ; do
                log_action_cont_msg "$line"
            done
        fi
    else
        log_action_begin_msg "Skip starting firewall:" "ufw (not enabled)"
    fi
    log_action_end_msg $error
    exit $error
    ;;
stop)
    if [ "$ENABLED" = "yes" ] || [ "$ENABLED" = "YES" ]; then
        log_action_begin_msg "Stopping firewall:" "ufw"
        output=`ufw_stop` || error="$?"
        if [ ! -z "$output" ]; then
            log_action_cont_msg "$output"
        fi
    else
        log_action_begin_msg "Skip stopping firewall:" "ufw (not enabled)"
    fi
    log_action_end_msg $error
    exit $error
    ;;
restart|force-reload)
    log_action_begin_msg "Reloading firewall:" "ufw"
    output=`ufw_reload` || error="$?"
    if [ ! -z "$output" ]; then
        log_action_cont_msg "$output"
    fi
    log_action_end_msg $error
    exit $error
    ;;
status)
    output=`ufw_status` || error="$?"
    if [ ! -z "$output" ]; then
        log_action_cont_msg "$output"
    fi
    log_action_end_msg $error
    exit $error
    ;;
*)
    echo "Usage: /etc/init.d/ufw {start|stop|restart|force-reload|status}"
    exit 1
    ;;
esac

exit 0