diff options
Diffstat (limited to 'www/aolserver/files')
| -rw-r--r-- | www/aolserver/files/pkg-install.in | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/www/aolserver/files/pkg-install.in b/www/aolserver/files/pkg-install.in index 901d0c348501..e77b789c4e74 100644 --- a/www/aolserver/files/pkg-install.in +++ b/www/aolserver/files/pkg-install.in @@ -1,21 +1,27 @@ #! /bin/sh PATH=/bin:/usr/sbin:/usr/bin -EXAMPLESDIR=%%EXAMPLESDIR%% -AOLSERVERBASE=%%AOLSERVERBASE%% -AOLSERVERUSER=%%AOLSERVERUSER%% -AOLSERVERGROUP=%%AOLSERVERGROUP%% +EXAMPLESDIR="%%EXAMPLESDIR%%" +AOLSERVERBASE="%%AOLSERVERBASE%%" +AOLSERVERUSER="%%AOLSERVERUSER%%" +AOLSERVERGROUP="%%AOLSERVERGROUP%%" + +MKDIR="%%MKDIR%%" +ECHO_CMD="%%ECHO_CMD%%" +CHOWN="%%CHOWN%%" +CHMOD="%%CHMOD%%" post-install() { - echo "Running post-install script" - echo "Setting file permissions" - mkdir -p ${AOLSERVERBASE}/servers/server1/pages - mkdir -p ${AOLSERVERBASE}/servers/server1/modules/nslog - mkdir -p ${AOLSERVERBASE}/log - echo "Welcome. You have made it. Aolserver has started." >> ${AOLSERVERBASE}/servers/server1/pages/index.html - chown ${AOLSERVERUSER}:${AOLSERVERGROUP} ${AOLSERVERBASE}/servers/server1/modules/nslog - chown ${AOLSERVERUSER}:${AOLSERVERGROUP} ${AOLSERVERBASE}/log - chmod 755 ${AOLSERVERBASE} + ${ECHO_CMD} "Running post-install script" + ${ECHO_CMD} "Setting file permissions" + ${MKDIR} -p ${AOLSERVERBASE}/servers/server1/pages + ${MKDIR} -p ${AOLSERVERBASE}/servers/server1/modules/nslog + ${MKDIR} -p ${AOLSERVERBASE}/log + [ -f ${AOLSERVERBASE}/servers/server1/pages/index.html ] || \ + ${ECHO_CMD} "Welcome. You have made it. Aolserver has started." > ${AOLSERVERBASE}/servers/server1/pages/index.html + ${CHOWN} ${AOLSERVERUSER}:${AOLSERVERGROUP} ${AOLSERVERBASE}/servers/server1/modules/nslog + ${CHOWN} ${AOLSERVERUSER}:${AOLSERVERGROUP} ${AOLSERVERBASE}/log + ${CHMOD} 755 ${AOLSERVERBASE} } case $2 in |
