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

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"
}