summaryrefslogtreecommitdiffstats
path: root/extra/usbmuxd/usbmuxd.install
diff options
context:
space:
mode:
Diffstat (limited to 'extra/usbmuxd/usbmuxd.install')
-rw-r--r--extra/usbmuxd/usbmuxd.install21
1 files changed, 21 insertions, 0 deletions
diff --git a/extra/usbmuxd/usbmuxd.install b/extra/usbmuxd/usbmuxd.install
new file mode 100644
index 000000000..5b46db012
--- /dev/null
+++ b/extra/usbmuxd/usbmuxd.install
@@ -0,0 +1,21 @@
+post_install() {
+ getent group usbmux >/dev/null 2>&1 || usr/sbin/groupadd -g 140 usbmux
+ getent passwd usbmux >/dev/null 2>&1 || usr/sbin/useradd -c 'usbmux user' -u 140 -g usbmux -d / -s /sbin/nologin usbmux
+
+ usr/bin/passwd -l usbmux &>/dev/null
+}
+
+pre_upgrade () {
+ if [ $2 == "1.0.4-1" ]; then
+ pre_remove $1
+ fi
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ getent passwd usbmux >/dev/null 2>&1 && userdel usbmux
+ getent group usbmux >/dev/null 2>&1 && groupdel usbmux
+}