You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/media-video/ushare/files/ushare.init.d.ng

36 lines
954 B

#!/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 $?
}