blob: 8bc21d01750b81fbe2f4a7d0e29d12f587245013 (
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
25
26
27
28
29
30
31
32
33
34
35
|
#!/sbin/openrc-run
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
use net
}
start() {
ebegin "Starting uShare"
if [ ! -f /etc/ushare.conf -a -f /etc/conf.d/ushare ]; then
ewarn "Please migrate your settings from"
ewarn "/etc/conf.d/ushare to the new /etc/ushare.conf file"
ewarn "and then delete the /etc/conf.d/ushare file."
eerror "User migration steps are needed!"
fi
if [ -f /etc/ushare.conf -a -f /etc/conf.d/ushare ]; then
ewarn "Old configuration file /etc/conf.d/ushare detected!"
ewarn "Please migrate your settings to the new /etc/ushare.conf file"
ewarn "and then delete the old one."
eerror "User migration steps are needed!"
fi
start-stop-daemon --start --quiet -u ushare \
--exec /usr/bin/ushare -- -D --cfg=/etc/ushare.conf
eend $?
}
stop() {
ebegin "Stopping uShare"
start-stop-daemon --stop --quiet --exec /usr/bin/ushare
eend $?
}
|