updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / ruby-gitauth-git / gitauth.install
blob5e27fe5224f079f68e8f02494be7015f84c5d167
1 #!/bin/sh
2 # $Id$
3 # vim:set ts=2 sw=2 et:
5 # arg 1: the new package version
6 pre_install() {
7 /bin/true
10 # arg 1: the new package version
11 post_install() {
12 echo ">>> Creating gitauth user and group and setting permissions..."
13 getent group git > /dev/null || usr/sbin/groupadd git &> /dev/null
14 getent passwd git > /dev/null || usr/sbin/useradd --shell /bin/bash -g git --home '/opt/gitauth' --system --comment 'Git Auth User' git &> /dev/null
16 chown -R git:git /opt/gitauth
17 chmod -R 775 /opt/gitauth
19 echo ">>> To install gitauth, please run"
20 echo ">>> sudo -H -u git -i /opt/gitauth/bin/gitauth install"
22 cat << EOF
23 >>>
24 EOF
27 # arg 1: the new package version
28 # arg 2: the old package version
29 pre_upgrade() {
30 /bin/true
33 # arg 1: the new package version
34 # arg 2: the old package version
35 post_upgrade() {
36 post_install $1
39 # arg 1: the old package version
40 pre_remove() {
41 usr/sbin/userdel git &>/dev/null
42 usr/sbin/groupdel git &>/dev/null
45 # arg 1: the old package version
46 post_remove() {
47 /bin/true