summaryrefslogtreecommitdiff
blob: 64aa93fd06781adb4d30e011e03c927d3e6fe6fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/sbin/openrc-run
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

DAEMON="/usr/sbin/guacd"
PIDFILE="/run/guacd/guacd"

depend() {
    use net
}

start() {
    checkpath -q -d -m 0755 -o guacd:guacd /run/guacd/
    ebegin "Starting guacd"
    start-stop-daemon --start --user guacd:guacd --exec "${DAEMON}" -- -p "${PIDFILE}"
    eend $? "Failed to start guacd"
}

stop() {
    ebegin "Stopping guacd"
    start-stop-daemon --stop --pidfile "${PIDFILE}"
    eend $? "Failed to stop guacd"
}