initial import
This commit is contained in:
25
ympd/ympd.install
Normal file
25
ympd/ympd.install
Normal file
@@ -0,0 +1,25 @@
|
||||
post_install() {
|
||||
# create group and user
|
||||
if ! getent group ympd &>/dev/null; then
|
||||
groupadd -r ympd >/dev/null
|
||||
fi
|
||||
if ! getent passwd ympd &>/dev/null; then
|
||||
useradd -r -c "ympd web-interface user" -d /var/empty -g ympd -s /bin/nologin ympd >/dev/null
|
||||
fi
|
||||
|
||||
# message for user
|
||||
echo "Please note that either a local or remote running instance of MPD is needed."
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
if getent passwd ympd &>/dev/null; then
|
||||
userdel ympd >/dev/null
|
||||
fi
|
||||
if getent group ympd &>/dev/null; then
|
||||
groupdel ympd >/dev/null
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user