• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/dbus/S30dbus
Carlos SantosCarlos Santos committed 7183a0eff9d16 Apr 2018
Raw file
Source viewDiff to previous
 
1
#!/bin/sh
2
#
3
# messagebus:   The D-BUS systemwide message bus
4
#
5
# chkconfig: 345 97 03
6
# description:  This is a daemon which broadcasts notifications of system events \
7
#               and other messages. See http://www.freedesktop.org/software/dbus/
8
#
9
# processname: dbus-daemon
10
# pidfile: /var/run/messagebus.pid
11
#
12
​
13
# Create needed directories.
14
[ -d /var/run/dbus ] || mkdir -p /var/run/dbus
15
[ -d /var/lock/subsys ] || mkdir -p /var/lock/subsys
16
[ -d /tmp/dbus ] || mkdir -p /tmp/dbus
17
​
18
RETVAL=0
19
​
20
start() {
21
    printf "Starting system message bus: "
22
​
23
    dbus-uuidgen --ensure
24
    dbus-daemon --system
25
    RETVAL=$?
26
    echo "done"
27
    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dbus-daemon
28
}
29
​
30
stop() {
31
    printf "Stopping system message bus: "
32
​
33
    ## we don't want to kill all the per-user $processname, we want
34
    ## to use the pid file *only*; because we use the fake nonexistent 
35
    ## program name "$servicename" that should be safe-ish
36
    killall dbus-daemon
37
    RETVAL=$?
38
    echo "done"
39
    if [ $RETVAL -eq 0 ]; then
40
        rm -f /var/lock/subsys/dbus-daemon
41
        rm -f /var/run/messagebus.pid
42
    fi
43
}
44
​
45
# See how we were called.
46
case "$1" in
47
    start)
48
        start
49
        ;;
50
    stop)
51
        stop
52
        ;;
53
    restart)
54
        stop
55
        start
56
        ;;
57
    condrestart)
58
        if [ -f /var/lock/subsys/$servicename ]; then
59
            stop
60
            start
61
        fi
62
        ;;
63
    reload)
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.