From 03f3861c43ee38aa9dc0b928c387b84e06081677 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sun, 23 Apr 2017 02:52:42 -0600 Subject: [PATCH] Create switch.sh --- centos/resources/switch.sh | 49 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 centos/resources/switch.sh diff --git a/centos/resources/switch.sh b/centos/resources/switch.sh new file mode 100644 index 0000000..a7d47f1 --- /dev/null +++ b/centos/resources/switch.sh @@ -0,0 +1,49 @@ +#!/bin/sh + +#move to script directory so all relative paths work +cd "$(dirname "$0")" + +#includes +. ./config.sh + +if [ .$switch_source = .true ]; then + if [ ."$switch_branch" = "master" ]; then + switch/source-master.sh + else + switch/source-release.sh + fi + + #copy the switch conf files to /etc/freeswitch + switch/conf-copy.sh + + #set the file permissions + switch/source-permissions.sh + + #systemd service + switch/source-systemd.sh +fi + +if [ .$switch_package = .true ]; then + if [ ."$switch_branch" = "master" ]; then + if [ .$switch_package_all = .true ]; then + switch/package-master-all.sh + else + switch/package-master.sh + fi + else + if [ .$switch_package_all = .true ]; then + switch/package-all.sh + else + switch/package-release.sh + fi + fi + + #copy the switch conf files to /etc/freeswitch + switch/conf-copy.sh + + #set the file permissions + switch/package-permissions.sh + + #systemd service + switch/package-systemd.sh +fi