summarylogtreecommitdiffstats
path: root/airtime.install
blob: a3ad98e0c011ab3886cf6cea660d8b38973e8dd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
post_install() {
	if type -P systemd-tmpfiles &> /dev/null; then
    systemd-tmpfiles --create airtime.conf
  fi
  echo ">>> In order to get Airtime working, here's what to do."
  echo ">>> Please refer to Arch Linux wiki for php56 and httpd basic setup"
  echo ""
  echo ">> In /etc/httpd/conf/httpd.conf"
  echo "> uncomment" 
  echo "LoadModule deflate_module modules/mod_deflate.so"
  echo ""
  echo "> add the lines"
  echo "# Airtime"
  echo "Include conf/extra/httpd-airtime.conf"
  echo ""
  echo ">> In /etc/php56/php.ini"
  echo "> enable the following modules:"
  echo "bcmath pgsql pdo_pgsql gd"
  echo ""
  echo ">> Start rabbitmq"
  echo "systemctl start rabbitmq"
  echo ""
  echo ">> Enable airtime user and vhost on rabbitmq"
  echo "sudo -u rabbitmq rabbitmqctl add_user airtime airtime"
  echo "sudo -u rabbitmq rabbitmqctl add_vhost /airtime"
  echo "sudo -u rabbitmq rabbitmqctl set_permissions -p /airtime airtime ".*" ".*" ".*""
  echo ""
  echo ">> Start PostgreSql as described in Arch Linux Wiki and create an user for airtime"
  echo ""
  echo ">> Start Apache"
  echo "systemctl start httpd"
  echo ""
  echo "Follow the steps at http://127.0.0.1:80"
}

post_upgrade() {
	if type -P systemd-tmpfiles &> /dev/null; then
		systemd-tmpfiles --create airtime.conf
 	fi
}