diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2024-02-16 03:56:52 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2024-02-16 04:00:52 +0100 |
commit | 06b46fb60a9dd24f887ddd2d2888d59e43b32675 (patch) | |
tree | a1753afae6bc7364f2e9a1db91ceb47be7e9f6d8 /package/mympd/files | |
parent | 3a86f28c740b307d0d591d057ece68e6a252cf85 (diff) |
mympd: new package
Diffstat (limited to 'package/mympd/files')
-rw-r--r-- | package/mympd/files/mympd.init | 31 | ||||
-rw-r--r-- | package/mympd/files/mympd.postinst | 7 |
2 files changed, 38 insertions, 0 deletions
diff --git a/package/mympd/files/mympd.init b/package/mympd/files/mympd.init new file mode 100644 index 000000000..f7eec5b6d --- /dev/null +++ b/package/mympd/files/mympd.init @@ -0,0 +1,31 @@ +#!/bin/sh +#PKG mympd +#INIT 90 + +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${mympd:-NO}" = x"NO" && exit 0 + test x"$mympd" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start + exec sh $0 start + ;; +start) + mkdir -p /var/cache/mympd 2>/dev/null + mkdir -p /etc/mympd 2>/dev/null + mympd -w /etc/mympd -s & + ;; +stop) + kill $(pgrep -f mympd) + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/mympd/files/mympd.postinst b/package/mympd/files/mympd.postinst new file mode 100644 index 000000000..be700987b --- /dev/null +++ b/package/mympd/files/mympd.postinst @@ -0,0 +1,7 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf mympd NO +gid=$(get_next_gid) +add_group mympd $gid +add_user mympd $(get_next_uid) $gid /var/lib/mympd + |