summaryrefslogtreecommitdiff
path: root/www/resin2/files/install.sh
diff options
context:
space:
mode:
authorGreg Lewis <glewis@FreeBSD.org>2003-11-20 21:25:09 +0000
committerGreg Lewis <glewis@FreeBSD.org>2003-11-20 21:25:09 +0000
commit5dce3730a4e662e410e2e6f34b852f3a1006362f (patch)
treeab08231cf6ee1289189f71303cfd80a8d9700f5c /www/resin2/files/install.sh
parentUpdate 1.33 to 1.33_1. (diff)
. Avoid conflict between resin2 and resin3
. Fix resin{2,3}ctl first line (perl path) . Pid file is no more created in the Makefile . New resin.sh startup script, manages pid file . pkg-[de]install and pkg-message are now generated . Do not write anything after including bsd.port.post.mk . Packages are now supported (reported by Arcadius Ahouansou) . Integration with apxs for [de]activating mod_caucho PR: 57566 Submitted by: Jean-Baptiste Quenot <jbq@caraldi.com> (maintainer)
Notes
Notes: svn path=/head/; revision=94541
Diffstat (limited to 'www/resin2/files/install.sh')
-rw-r--r--www/resin2/files/install.sh48
1 files changed, 48 insertions, 0 deletions
diff --git a/www/resin2/files/install.sh b/www/resin2/files/install.sh
new file mode 100644
index 000000000000..36e53c1e9bac
--- /dev/null
+++ b/www/resin2/files/install.sh
@@ -0,0 +1,48 @@
+#! /bin/sh
+
+set -e
+
+warning() {
+ echo "Kept %%PREFIX%%/etc/%%APP_NAME%%.xml intact from previous installation, please diff"
+ echo "against %%APP_NAME%%.xml-dist"
+}
+
+# Install config file only if none is already there
+if test -e %%PREFIX%%/etc/%%APP_NAME%%.xml && \
+ ! cmp -s %%WRKDIR%%/resin.conf %%PREFIX%%/etc/%%APP_NAME%%.xml ; then
+ echo
+ echo "********************************************************************************"
+ warning | fmt -w 80
+ echo "********************************************************************************"
+ echo
+else
+ install %%WRKDIR%%/resin.conf %%PREFIX%%/etc/%%APP_NAME%%.xml
+ echo Installed %%PREFIX%%/etc/%%APP_NAME%%.xml
+fi
+
+# Install new config file with '-dist' appended
+install %%WRKDIR%%/resin.conf %%PREFIX%%/etc/%%APP_NAME%%.xml-dist
+echo Installed %%PREFIX%%/etc/%%APP_NAME%%.xml-dist
+
+install %%WRKDIR%%/resin.sh.in %%PREFIX%%/etc/rc.d/%%APP_NAME%%.sh
+chmod 755 %%PREFIX%%/etc/rc.d/%%APP_NAME%%.sh
+echo Installed %%PREFIX%%/etc/rc.d/%%APP_NAME%%.sh
+
+install %%WRKSRC%%/bin/wrapper.pl %%PREFIX%%/sbin/%%APP_NAME%%ctl
+echo Installed %%PREFIX%%/sbin/%%APP_NAME%%ctl
+
+test -d %%APP_HOME%% || mkdir %%APP_HOME%%
+echo Created installation directory %%APP_HOME%%
+
+list()
+{
+ for dir in doc lib xsl ; do
+ ( cd %%WRKSRC%% ; find $dir )
+ done
+}
+
+# Remove all empty dirs
+( cd %%WRKSRC%% ; find doc -type d -empty -delete )
+
+echo Installing in %%APP_HOME%%
+list | xargs tar -C %%WRKSRC%% -cf- | tar -C %%APP_HOME%% -xpf-