From 3610ed3bccdc3f6dcd7435e708efc8d0061096b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Tue, 25 Oct 2016 15:29:10 +0200 Subject: [PATCH] moved cleanup.sh to contrip/packager.io / added contrib/packager.io/postinstall.sh --- .pkgr.yml | 3 ++- contrib/{ => packager.io}/cleanup.sh | 0 contrib/packager.io/postinstall.sh | 13 +++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) rename contrib/{ => packager.io}/cleanup.sh (100%) create mode 100755 contrib/packager.io/postinstall.sh diff --git a/.pkgr.yml b/.pkgr.yml index d215c7b1f..64791fb2e 100644 --- a/.pkgr.yml +++ b/.pkgr.yml @@ -27,10 +27,11 @@ before: - cp config/database.yml.pkgr config/database.yml - echo "gem 'mysql2'" >> Gemfile.local - "cat Gemfile.lock" - - contrib/cleanup.sh + - contrib/packager.io/cleanup.sh env: - RAILS_ENV=production - PORT=3000 - RAILS_SERVE_STATIC_FILES=true services: - postgres +after_install: contrib/packager.io/postinstall.sh diff --git a/contrib/cleanup.sh b/contrib/packager.io/cleanup.sh similarity index 100% rename from contrib/cleanup.sh rename to contrib/packager.io/cleanup.sh diff --git a/contrib/packager.io/postinstall.sh b/contrib/packager.io/postinstall.sh new file mode 100755 index 000000000..c2fc364f2 --- /dev/null +++ b/contrib/packager.io/postinstall.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -ex + +# create init scripts +/usr/bin/zammad scale web=1 websocket=1 worker=1 + +# start zammad +systemctl start zammad + +# start nginx +systemctl start nginx +