~ajmitch/sloecode/sloecode-debian

« back to all changes in this revision

Viewing changes to postinst

  • Committer: Andrew Mitchell
  • Date: 2012-03-12 21:55:15 UTC
  • Revision ID: ajmitch@ubuntu.com-20120312215515-pszucqngu221y39m
Fix up maintainer scripts to only delete users on purge, and only add the user if it doesn't exist already

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
#SC_GROUP=$RET
73
73
 
74
74
# add user and group to the system:
75
 
useradd  -r $RET
76
 
#groupadd -r $RET
 
75
if ! getent passwd $SC_USER >/dev/null; then
 
76
                useradd  -r $RET
 
77
    #groupadd -r $RET
 
78
fi
77
79
 
78
80
# modify apache config file appropriately:
79
81
sed -i "s/SLOECODE_USER/${SC_USER}/" /etc/apache2/sites-available/sloecode