[Pkg-javascript-commits] [rainloop] 02/02: Automatically copy webserver config files to sites-available during installation.

Daniel Ring techwolf-guest at moszumanska.debian.org
Sat Mar 24 10:23:34 UTC 2018


This is an automated email from the git hooks/post-receive script.

techwolf-guest pushed a commit to branch master
in repository rainloop.

commit 0ec7148c2c7b4ce5aa75726b7bbe53d033d66a49
Author: Daniel Ring <dring at wolfishly.me>
Date:   Fri Mar 23 21:31:47 2018 -0700

    Automatically copy webserver config files to sites-available during installation.
---
 debian/README.Debian | 18 +++++++++---------
 debian/postinst      | 17 +++++++++++++++++
 2 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/debian/README.Debian b/debian/README.Debian
index 96f1ee9..6c0f30e 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -11,20 +11,20 @@ Table of Contents:
 
 Nginx Configuration
 -------------------
-The Debian package for RainLoop provides a sample nginx config file in
-`/usr/share/doc/rainloop/rainloop.nginx.conf`. To use it, copy the file to
-`/etc/nginx/sites-available/` and apply any desired modifications. To
-publish the site, add a symlink to the file in `/etc/nginx/sites-enabled/`
-and reload the nginx service.
+The Debian package for RainLoop provides a sample Nginx config file in
+`/usr/share/doc/rainloop/rainloop.nginx.conf`. It is automatically copied
+to `/etc/nginx/sites-available/rainloop` during initial installation. To
+publish the website, edit the copied file as desired, add a symlink to it
+in `/etc/nginx/sites-enabled/`, and reload the nginx service.
 
 
 Apache2 Configuration
 --------------------
 The Debian package for RainLoop provides a sample Apache2 config file in
-`/usr/share/doc/rainloop/rainloop.apache.conf`. To use it, copy the file to
-`/etc/apache2/sites-available/` and apply any desired modifications. To
-publish the site, add a symlink to the file in `/etc/apache2/sites-enabled/`
-and reload the apache2 service.
+`/usr/share/doc/rainloop/rainloop.apache.conf`. It is automatically copied
+to `/etc/apache2/sites-available/rainloop.conf` during initial installation.
+To publish the website, edit the copied file as desired, add a symlink to it
+in `/etc/apache2/sites-enabled/`, and reload the apache2 service.
 
 
 Use with Other Webservers
diff --git a/debian/postinst b/debian/postinst
new file mode 100755
index 0000000..1dc9705
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+#Copy sample config file for Nginx
+if [ -d /etc/nginx/sites-available/ ]; then
+	if [ ! -f /etc/nginx/sites-available/rainloop ]; then
+		cp /usr/share/doc/rainloop/rainloop.nginx.conf /etc/nginx/sites-available/rainloop
+	fi
+fi
+
+#Copy sample config file for Apache2
+if [ -d /etc/apache2/sites-available/ ]; then
+	if [ ! -f /etc/apache2/sites-available/rainloop.conf ]; then
+		cp /usr/share/doc/rainloop/rainloop.apache.conf /etc/apache2/sites-available/rainloop.conf
+	fi
+fi
+
+#DEBHELPER#

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/rainloop.git



More information about the Pkg-javascript-commits mailing list