Add freedombox-setup script for plinth.

This allow us to handle all the Plinth setup in one package.  I've
added one change from Pere's original commit: we disable Apache's
default site.  If the default site is enabled, Plinth doesn't load
correctly (we get 404 errors).
This commit is contained in:
Nick Daly 2013-10-27 16:35:12 -05:00
commit a47ced4563
2 changed files with 19 additions and 1 deletions

View File

@ -22,7 +22,7 @@ predepend:
git submodule update
touch predepend
install: default apache-install
install: default apache-install freedombox-setup-install
mkdir -p $(DESTDIR)/etc/init.d $(DESTDIR)/etc/plinth
cp plinth.sample.fhs.config $(DESTDIR)/etc/plinth/plinth.config
mkdir -p $(DESTDIR)$(PYDIR) $(DESTDIR)$(DATADIR) $(DESTDIR)/usr/bin \
@ -37,6 +37,9 @@ install: default apache-install
cp -r data/* $(DESTDIR)/var/lib/plinth
rm -f $(DESTDIR)/var/lib/plinth/users/sqlite3.distrib
freedombox-setup-install:
install -m755 -D setup.d/86_plinth $(DESTDIR)/usr/lib/freedombox/setup.d/86_plinth
uninstall:
rm -rf $(DESTDIR)/usr/lib/python2.7/plinth $(DESTDIR)/usr/share/plinth/ \
$(DESTDIR)/etc/plinth $(DESTDIR)/var/lib/plinth $(DESTDIR)/usr/share/doc/plinth/ \

15
setup.d/86_plinth Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
#
# Enable Plinth.
echo "Configuring Plinth..."
make-ssl-cert generate-default-snakeoil
a2enmod ssl
a2enmod rewrite
a2enmod proxy
a2enmod proxy_http
a2dissite default
a2ensite plinth.conf
echo "Done configuring Plinth.."