diff options
author | Britney Fransen <brfransen@gmail.com> | 2017-01-27 23:13:30 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2017-01-27 23:13:30 (GMT) |
commit | bbf5814ec32ac78552bec7a9033d76277245472e (patch) | |
tree | b2613d059975604061b131ca3cf2ec49454080fb /abs/extra/tigervnc/tiger.install | |
parent | ff2f92f8c591385d2f721c9236ee7670c6182e5f (diff) | |
download | linhes_pkgbuild-bbf5814ec32ac78552bec7a9033d76277245472e.zip linhes_pkgbuild-bbf5814ec32ac78552bec7a9033d76277245472e.tar.gz linhes_pkgbuild-bbf5814ec32ac78552bec7a9033d76277245472e.tar.bz2 |
tigervnc: add .install to create vncsvc user
add vncsvc sudo rules. refs #1007
Diffstat (limited to 'abs/extra/tigervnc/tiger.install')
-rw-r--r-- | abs/extra/tigervnc/tiger.install | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/abs/extra/tigervnc/tiger.install b/abs/extra/tigervnc/tiger.install new file mode 100644 index 0000000..f04c011 --- /dev/null +++ b/abs/extra/tigervnc/tiger.install @@ -0,0 +1,21 @@ +post_install(){ + groupadd -g 78 vncsvc &>/dev/null + useradd -u 78 -m -g vncsvc -d /home/vncsvc -s /bin/bash vncsvc &>/dev/null + usermod -a -G mythtv vncsvc + chown -R vncsvc:vncsvc /home/vncsvc &>/dev/null +} + +post_upgrade(){ + getent group vncsvc >/dev/null 2>&1 || groupadd -g 78 vncsvc &>/dev/null + getent passwd vncsvc >/dev/null 2>&1 || useradd -u 78 -g vncsvc -m -d /home/vncsvc -s /bin/bash vncsvc &>/dev/null + usermod -a -G mythtv vncsvc +} + +post_remove(){ + if getent passwd vncsvc >/dev/null 2>&1; then + userdel vncsvc + fi + if getent group vncsvc >/dev/null 2>&1; then + groupdel vncsvc + fi +} |