This file is indexed.

/etc/init.d/fusionforge-systasksd is in fusionforge-common 6.0.5-2ubuntu1.

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
#!/bin/bash
### BEGIN INIT INFO
# Provides:          fusionforge-systasksd
# Required-Start:    $local_fs $remote_fs $network $syslog $named
# Required-Stop:     $local_fs $remote_fs $network $syslog $named
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# X-Interactive:     true
# Short-Description: Start/stop FusionForge's system tasks daemon
### END INIT INFO
# Copyright (C) 2014  Inria (Sylvain Beucler)

PIDFILE=/var/run/fusionforge-systasksd
PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
DAEMON=$(forge_get_config binary_path)/systasksd

function check_running() {
    if kill -0 $(cat $PIDFILE 2>/dev/null) 2>/dev/null; then
	return 0
    else
	return 1
    fi
}

case $1 in
    start)
	if check_running; then
	    echo "fusionforge-systasksd: already running"
	else
	    $DAEMON &
	    echo $! > $PIDFILE
	    if ! check_running; then
		echo "Failed"
		rm -f $PIDFILE
		return 1
	    fi
	    echo "fusionforge-systasksd: started"
	fi
	;;
    stop)
	if [ -e $PIDFILE ]; then
	    kill $(cat $PIDFILE)
	    rm -f $PIDFILE
	    echo "fusionforge-systasksd: stopped"
	else
	    echo "fusionforge-systasksd: no PID file, assuming stopped."
	fi
	;;
    status)
	if check_running; then
	    echo "fusionforge-systasksd: running"
	else
	    echo "fusionforge-systasksd: stopped"
	    return 3
	fi
	;;
    restart|force-reload)
	$0 stop
	$0 start
	;;

    *)
	echo "Usage: $0 start|stop|status|restart"
	exit 1
	;;
esac