summarylogtreecommitdiffstats
path: root/zotonic.install
diff options
context:
space:
mode:
authorDaichi Shinozaki2015-06-09 18:34:27 +0900
committerDaichi Shinozaki2015-06-09 18:34:27 +0900
commit4167fadda4788f68b7c3de258f1619440ae2f5ec (patch)
treee901701ae062099a485453b59c3abd54ee5f8c6f /zotonic.install
downloadaur-4167fadda4788f68b7c3de258f1619440ae2f5ec.tar.gz
Initial import
Diffstat (limited to 'zotonic.install')
-rw-r--r--zotonic.install28
1 files changed, 28 insertions, 0 deletions
diff --git a/zotonic.install b/zotonic.install
new file mode 100644
index 000000000000..792c4ebdc313
--- /dev/null
+++ b/zotonic.install
@@ -0,0 +1,28 @@
+post_install() {
+ groupadd zotonic
+ useradd -r -g zotonic -d /var/lib/zotonic zotonic
+ chown -R root:zotonic /etc/zotonic
+ chown -R zotonic:zotonic /var/lib/zotonic
+ chown -R zotonic:zotonic /var/log/zotonic
+ echo "###########################################"
+ echo "# - Edit /etc/zotonic/config to configure #"
+ echo "# Zotonic. #"
+ echo "# - Setup sites in /var/lib/zotonic/priv. #"
+ echo "# - Apply necessary modifications to #"
+ echo "# Postgresql's configuration and any #"
+ echo "# other package you want to interact #"
+ echo "# with Zotonic. #"
+ echo "# - Visit to http://zotonic.com for more #"
+ echo "# details on these tasks. #"
+ echo "###########################################"
+ echo "# Zotonic might take a lot of time on its #"
+ echo "# first run, as it will generate the #"
+ echo "# Erlang byte-code from source. #"
+ echo "###########################################"
+}
+
+post_remove() {
+ rm -rf /var/{lib,log}/zotonic
+ userdel zotonic
+ groupdel zotonic
+}