updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / x2goserver-git / x2goserver.install
blobcd71cda14ac32d9f9155cec34e0f0c4b576f9c13
1 x2go_user=x2gouser
3 fix_permissions()
5   chown root:$x2go_user /usr/lib/x2go/x2gosqlitewrapper
6   chmod 2755 /usr/lib/x2go/x2gosqlitewrapper
9 post_install() {
10   if ! getent passwd $x2go_user &> /dev/null; then
11     useradd -d /var/lib/x2go -s /bin/false $x2go_user &> /dev/null
12     passwd -l $x2go_user &> /dev/null
13     echo "  ==> User '$x2go_user' created"
14   fi
16   fix_permissions
17   
18 cat << 'EOM'
19   ==> Use the following command to setup sqlite database:
20   ==>
21   ==> x2godbadmin --createdb
22 EOM
25 post_upgrade()
27   fix_permissions
30 post_remove() {
31   userdel $x2go_user &> /dev/null
32   echo "  ==> User '$x2go_user' removed"