diff options
author | pav <pav@FreeBSD.org> | 2005-10-08 20:53:26 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2005-10-08 20:53:26 +0800 |
commit | f369b5a3358d4fdaefaf026daf79c0ceac0ff067 (patch) | |
tree | 723761fc65ac9ea02cf146da3984474a98ac38fb /www | |
parent | d48839c8c7fbdf53ccfb480dee5afb3e8c050f3c (diff) | |
download | freebsd-ports-gnome-f369b5a3358d4fdaefaf026daf79c0ceac0ff067.tar.gz freebsd-ports-gnome-f369b5a3358d4fdaefaf026daf79c0ceac0ff067.tar.zst freebsd-ports-gnome-f369b5a3358d4fdaefaf026daf79c0ceac0ff067.zip |
- Remove home directory of service0 user
- Don't automatically add entries to rc.conf
PR: ports/87089
Submitted by: A. Nooitgedagt <aldert@nooitgedagt.net> (maintainer)
Diffstat (limited to 'www')
-rw-r--r-- | www/openacs/Makefile | 14 | ||||
-rw-r--r-- | www/openacs/files/pkg-install.in | 39 | ||||
-rw-r--r-- | www/openacs/files/post-config.in | 40 |
3 files changed, 48 insertions, 45 deletions
diff --git a/www/openacs/Makefile b/www/openacs/Makefile index 7f19f2829c36..170ca5b6e62f 100644 --- a/www/openacs/Makefile +++ b/www/openacs/Makefile @@ -7,7 +7,7 @@ PORTNAME?= openacs PORTVERSION?= 5.1.5 -PORTREVISION?= 1 +PORTREVISION?= 2 CATEGORIES= www MASTER_SITES?= http://openacs.org/projects/openacs/download/download/ @@ -129,12 +129,12 @@ post-install: | ${SED} -ne 's,^${WRKSRC},@dirrm ${DATADIR:S,^${PREFIX}/,,},p' >> ${TMPPLIST} @${ECHO_CMD} "@dirrm ${EXAMPLESDIR:S,^${PREFIX}/,,}" >> ${TMPPLIST} - if [ ${DT} ] ; then \ - @${MKDIR} ${DTSERVICEBASE} ; \ - @${TEST} -L ${DTSERVICEBASE}/${OPENACS_USER} || ${LN} -s ${OPENACSBASE}/${OPENACS_USER}/etc/daemontools ${DTSERVICEBASE}/${OPENACS_USER} ; \ - @${ECHO_CMD} "@cd ${DTSERVICEBASE}" >> ${TMPPLIST} ; \ - @${ECHO_CMD} "${OPENACS_USER}" >> ${TMPPLIST} ; \ - @${ECHO_CMD} "@unexec rmdir ${DTSERVICEBASE} 2>&1 > /dev/null || true" >> ${TMPPLIST} ; \ + @if [ ${DT} ] ; then \ + ${MKDIR} ${DTSERVICEBASE} ; \ + ${TEST} -L ${DTSERVICEBASE}/${OPENACS_USER} || ${LN} -s ${OPENACSBASE}/${OPENACS_USER}/etc/daemontools ${DTSERVICEBASE}/${OPENACS_USER} ; \ + ${ECHO_CMD} "@cd ${DTSERVICEBASE}" >> ${TMPPLIST} ; \ + ${ECHO_CMD} "${OPENACS_USER}" >> ${TMPPLIST} ; \ + ${ECHO_CMD} "@unexec rmdir ${DTSERVICEBASE} 2>&1 > /dev/null || true" >> ${TMPPLIST} ; \ fi @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL diff --git a/www/openacs/files/pkg-install.in b/www/openacs/files/pkg-install.in index fe8122f4345d..b95756f5a5b7 100644 --- a/www/openacs/files/pkg-install.in +++ b/www/openacs/files/pkg-install.in @@ -59,40 +59,6 @@ if [ -d ${OPENACSBASE}/${OPENACS_USER} ] ; then echo " " exit 1 ; fi -for DIRS in /usr/share/skel/dot -do -if egrep 'OPENACS-entries in .profile' ${DIRS}.profile >/dev/null 2>&1; then - echo "You already have OPENACS-entries in .profile (skeleton)" -else - echo "${DIRS}.profile: adding entries" && \ - echo "# OPENACS-entries in .profile:" >> ${DIRS}.profile && \ - echo "export PATH=\$$PATH:${PGBASE}/bin" >> ${DIRS}.profile && \ - echo "export PGDATA=${PGDATA}" >> ${DIRS}.profile && \ - echo "export LD_LIBRARY_PATH=\$$LD_LIBRARY_PATH:${PGBASE}/lib" >> ${DIRS}.profile && \ - echo "export PS1=\"<\u-\W>\"" >> ${DIRS}.profile && \ - echo "export PS2=\"continu>\"" >> ${DIRS}.profile && \ - echo "export CVSROOT=/cvsroot" >> ${DIRS}.profile && \ - echo "export EDITOR=emacs" >> ${DIRS}.profile && \ - echo "# end of OPENACS-entries." >> ${DIRS}.profile -fi -done - -if egrep 'OPENACS-entries in rc.conf' ${RCCONF} >/dev/null 2>&1; then - echo "You already have OPENACS-entries in ${RCCONF}" -else - echo "${RCCONF}: adding entries" && \ - echo "# OPENACS-entries in rc.conf:" >> ${RCCONF} && \ - echo "ldconfig_paths=\"/usr/lib/compat /usr/X11R6/lib ${LOCALBASE}/lib ${PGBASE}/lib ${AOLSERVERBASE}/lib\" " >> ${RCCONF} && \ - echo "postgresql_enable=\"YES\"" >> ${RCCONF} && \ - echo "postgresql_data=\"${PGDATA}\"" >> ${RCCONF} && \ - echo "postgresql_flags=\" -l ${PGDATA}/server.log\"" >> ${RCCONF} && \ - echo "aolserver_enable=\"YES\"" >> ${RCCONF} && \ - echo "aolserver_conf=\"${OPENACSBASE}/${OPENACS_USER}/etc/config.tcl\"" >> ${RCCONF} && \ - echo "aolserver_flags=\"-u ${OPENACS_USER} -g ${OPENACS_GROUP} -b 0.0.0.0:8000\"" >> ${RCCONF} && \ - echo "aolserver_prog=\"${EXAMPLESDIR}/nsd-postgres\"" >> ${RCCONF} && \ - echo "# end of OPENACS-entries." >> ${RCCONF} -fi - if pw group show ${OPENACS_GROUP} >/dev/null 2>&1; then echo "You already have a group \"${OPENACS_GROUP}\", so I will use it." else @@ -103,12 +69,9 @@ if pw user show ${OPENACS_USER} >/dev/null 2>&1; then echo "You already have a user \"${OPENACS_USER}\", so I will use it." else pw useradd -n ${OPENACS_USER} -G ${OPENACS_GROUP} -c "OpenACS instance pseudo-user" \ - -m -s ${LOCALBASE}/bin/bash -h - + -h - fi - pw usermod nobody -G ${OPENACS_GROUP} - pw usermod pgsql -G ${OPENACS_GROUP} - pw usermod root -G ${OPENACS_GROUP} } post-install() { diff --git a/www/openacs/files/post-config.in b/www/openacs/files/post-config.in index d443b7bde344..2ae81117aab9 100644 --- a/www/openacs/files/post-config.in +++ b/www/openacs/files/post-config.in @@ -16,6 +16,46 @@ AOLSERVERBASE=%%AOLSERVERBASE%% VIRTUALBASE=%%VIRTUALBASE%% post-install() { + echo "Starting post-config changes on your request" + +for DIRS in /usr/share/skel/dot +do +if egrep 'OPENACS-entries in .profile' ${DIRS}.profile >/dev/null 2>&1; then + echo "Notice: there are OPENACS-entries in .profile (skeleton)" +else + echo "Notice: adding OPENACS-entries to ${DIRS}.profile" && \ + echo "# OPENACS-entries in .profile:" >> ${DIRS}.profile && \ + echo "export PATH=\$$PATH:${PGBASE}/bin" >> ${DIRS}.profile && \ + echo "export PGDATA=${PGDATA}" >> ${DIRS}.profile && \ + echo "export LD_LIBRARY_PATH=\$$LD_LIBRARY_PATH:${PGBASE}/lib" >> ${DIRS}.profile && \ + echo "export PS1=\"<\u-\W>\"" >> ${DIRS}.profile && \ + echo "export PS2=\"continu>\"" >> ${DIRS}.profile && \ + echo "export CVSROOT=/cvsroot" >> ${DIRS}.profile && \ + echo "export EDITOR=emacs" >> ${DIRS}.profile && \ + echo "# end of OPENACS-entries." >> ${DIRS}.profile +fi +done + +if egrep 'OPENACS-entries in rc.conf' ${RCCONF} >/dev/null 2>&1; then + echo "Notice: there are OPENACS-entries in ${RCCONF}" +else + echo "Notice: adding OPENACS-entries to ${RCCONF}" && \ + echo "# OPENACS-entries in rc.conf:" >> ${RCCONF} && \ + echo "ldconfig_paths=\"/usr/lib/compat /usr/X11R6/lib ${LOCALBASE}/lib ${PGBASE}/lib ${AOLSERVERBASE}/lib\" " >> ${RCCONF} && \ + echo "postgresql_enable=\"YES\"" >> ${RCCONF} && \ + echo "postgresql_data=\"${PGDATA}\"" >> ${RCCONF} && \ + echo "postgresql_flags=\" -l ${PGDATA}/server.log\"" >> ${RCCONF} && \ + echo "aolserver_enable=\"YES\"" >> ${RCCONF} && \ + echo "aolserver_conf=\"${OPENACSBASE}/${OPENACS_USER}/etc/config.tcl\"" >> ${RCCONF} && \ + echo "aolserver_flags=\"-u ${OPENACS_USER} -g ${OPENACS_GROUP} -b 0.0.0.0:8000\"" >> ${RCCONF} && \ + echo "aolserver_prog=\"${EXAMPLESDIR}/nsd-postgres\"" >> ${RCCONF} && \ + echo "# end of OPENACS-entries." >> ${RCCONF} +fi + + echo "adding root and ${PG_USER} to group ${OPENACS_GROUP}" + pw usermod ${PG_USER} -G ${OPENACS_GROUP} + pw usermod root -G ${OPENACS_GROUP} + echo "Set permissions of files (post-config)" chown -R :${OPENACS_GROUP} ${AOLSERVERBASE} |