diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /media-video/ushare/files/ushare.init.d.ng |
reinit the tree, so we can have metadata
Diffstat (limited to 'media-video/ushare/files/ushare.init.d.ng')
-rw-r--r-- | media-video/ushare/files/ushare.init.d.ng | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/media-video/ushare/files/ushare.init.d.ng b/media-video/ushare/files/ushare.init.d.ng new file mode 100644 index 000000000000..8bc21d01750b --- /dev/null +++ b/media-video/ushare/files/ushare.init.d.ng @@ -0,0 +1,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 $? +} |