From 44bc066a26c6f87bee05f15b33230cab691e641a Mon Sep 17 00:00:00 2001 From: Richard Neese Date: Mon, 23 May 2016 14:51:12 -0500 Subject: [PATCH] cleanup of the deb pkg ver of the install --- debian/resources/debian-repos.sh | 5 +-- debian/resources/fusionpbx-packages.sh | 6 ++-- debian/resources/fusionpbx.sh | 10 +++--- debian/resources/postgres.sh | 39 ---------------------- debian/resources/provision.sh | 4 +-- debian/resources/switch/package-release.sh | 21 ++++++------ 6 files changed, 22 insertions(+), 63 deletions(-) delete mode 100644 debian/resources/postgres.sh diff --git a/debian/resources/debian-repos.sh b/debian/resources/debian-repos.sh index 9e6ca7e..ea3841f 100644 --- a/debian/resources/debian-repos.sh +++ b/debian/resources/debian-repos.sh @@ -1,7 +1,8 @@ ####################################### -#Setup Main debian repo for right pkgs +# Setup Main debian repo for right pkgs +# This makes the repos use the repo local +# to theusers region ####################################### -echo "installing jessie release repo" cat > "/etc/apt/sources.list" << DELIM deb http://httpredir.debian.org/debian/ jessie main contrib non-free deb-src http://httpredir.debian.org/debian/ jessie main contrib non-free diff --git a/debian/resources/fusionpbx-packages.sh b/debian/resources/fusionpbx-packages.sh index 54442fd..a3e618d 100644 --- a/debian/resources/fusionpbx-packages.sh +++ b/debian/resources/fusionpbx-packages.sh @@ -1,3 +1,5 @@ +#Select Optional Addon Pkgs +###################################################################################################################### adminer="y" # : integrated for an administrator in the superadmin group to enable easy database access backup="y" # : pbx backup module. backup sqlite db / configs/ logs call_broadcast="n" # : Create a recording and select one or more groups to have the system call and play the recording @@ -11,10 +13,8 @@ fax="y" # : fusionpbx send/recieve faxes service fifo="n" # : first in first out call queues system services="n" # : allows interaction with the processes running on your server traffic_graph="n" # : php graph for monitoing the network interface traffic +##################################################################################################################### -########################### -#Optional APP PKGS installs -########################### if [[ $adminer == "y" ]]; then apt-get -y --force-yes install fusionpbx-app-adminer fi diff --git a/debian/resources/fusionpbx.sh b/debian/resources/fusionpbx.sh index c409bd7..30b7b5d 100644 --- a/debian/resources/fusionpbx.sh +++ b/debian/resources/fusionpbx.sh @@ -42,7 +42,7 @@ cp -rp "$fs_dflt_conf_dir"/vanilla/* "/etc/fusionpbx" ######################################## #fix ownership of files for freeswitch ######################################## -chown -R freeswitch:www-data "/etc/fusionpbx" +chown -R www-data:freeswitch "/etc/fusionpbx" ################################################## #configuring freeswitch to start with new layout. @@ -56,14 +56,13 @@ CONFDIR="/etc/fusionpbx" # Options to control locations of files: fs_conf="/etc/fusionpbx" fs_db="/var/lib/freeswitch/db" -fs_imgs="/var/lib/fusionpbx/images" fs_log="/var/log/freeswitch" fs_recordings="/var/lib/fusionpbx/recordings" -fs_run="/var/run/freeswitch" +fs_run="/run/freeswitch" fs_scripts="/var/lib/fusionpbx/scripts" fs_storage="/var/lib/fusionpbx/storage" fs_usr=freeswitch -fs_grp=\$fs_usr +fs_grp=www-data # #These are the optional arguments you can pass to freeswitch: (add options to fs_options line) # -nf -- no forking @@ -86,10 +85,9 @@ fs_grp=\$fs_usr # -nc -- do not output to a console and background # -ncwait -- do not output to a console and background but wait until the system is ready before exiting (implies -nc) # -c -- output to a console and stay in the foreground -fs_options="-nc -rp -reincarnate" # # Reads in the arguments into 1 line command -DAEMON_ARGS="-u \$fs_usr -g \$fs_grp -conf \$fs_conf -db \$fs_db -images \$fs_images -log \$fs_log -scripts \$fs_scripts -run \$fs_run -storage \$fs_storage -recordings \$fs_recordings \$fs_options" +DAEMON_ARGS="-nc -rp -reincarnate" DELIM ################################################################# diff --git a/debian/resources/postgres.sh b/debian/resources/postgres.sh deleted file mode 100644 index 46ea9c9..0000000 --- a/debian/resources/postgres.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -#send a message -echo "Install PostgreSQL" - -#generate a random password -password=$(dd if=/dev/urandom bs=1 count=20 2>/dev/null | base64) - -#Postgres -echo "Install PostgreSQL and create the database and users\n" -apt-get install -y --force-yes sudo postgresql - -#systemd -/bin/systemctl restart postgresql - -#init.d -#/usr/sbin/service postgresql restart - -#add the databases, users and grant permissions to them -sudo -u postgres psql -c "CREATE DATABASE fusionpbx"; -sudo -u postgres psql -c "CREATE DATABASE freeswitch"; -sudo -u postgres psql -c "CREATE ROLE fusionpbx WITH SUPERUSER LOGIN PASSWORD '$password';" -sudo -u postgres psql -c "CREATE ROLE freeswitch WITH SUPERUSER LOGIN PASSWORD '$password';" -sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE fusionpbx to fusionpbx;" -sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE freeswitch to fusionpbx;" -sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE freeswitch to freeswitch;" -#ALTER USER fusionpbx WITH PASSWORD 'newpassword'; - -#set the ip address -server_address=$(hostname -I) - -#Show database password -echo "" -echo "" -echo "PostgreSQL" -echo " Database name: fusionpbx" -echo " Database username: fusionpbx" -echo " Database password: $password" -echo "" \ No newline at end of file diff --git a/debian/resources/provision.sh b/debian/resources/provision.sh index ebe6e5a..1c8c69c 100644 --- a/debian/resources/provision.sh +++ b/debian/resources/provision.sh @@ -1,5 +1,5 @@ #Selet What Phone Provision System to Install - +############################################################################### aastra="n" # : phone provisioning tool & templates for aastra phones atcom="n" # : phone provisioning tool & templates for atcom phones cisco="n" # : phone provisioning tool & templates for cisco phones @@ -11,7 +11,7 @@ panasonic="n" # : phone provisioning tool & templates for panasonic phones polycom="n" # : phone provisioning tool & templates for polycom phones snom="n" # : provisioning tool & templates for snom phones yealink="n" # : phone provisioning tool & templates for yealink phones - +############################################################################### if [[ $aastra == "y" ]]; then apt-get -y --force-yes install fusionpbx-app-devices fusionpbx-app-provision fusionpbx-provisioning-template-aastra && mkdir -p /etc/fusionpbx/resources/templates/provision && cp -rp /usr/share/examples/fusionpbx/resources/templates/provision/aastra /etc/fusionpbx/resources/templates/provision/ diff --git a/debian/resources/switch/package-release.sh b/debian/resources/switch/package-release.sh index 28146fd..539daea 100644 --- a/debian/resources/switch/package-release.sh +++ b/debian/resources/switch/package-release.sh @@ -29,17 +29,16 @@ apt-get update && apt-get -y install --force-yes sqlite3 unixodbc uuid memcached #Freeswitch Pkgs apt-get -y install --force-yes libfreeswitch1 freeswitch freeswitch-mod-curl freeswitch-systemd freeswitch-mod-db freeswitch-doc \ - freeswitch-mod-distributor freeswitch-mod-dptools freeswitch-mod-enum freeswitch-mod-esf freeswitch-mod-esl \ - freeswitch-mod-expr freeswitch-mod-fsv freeswitch-mod-hash freeswitch-mod-memcache freeswitch-mod-portaudio \ - freeswitch-mod-portaudio-stream freeswitch-mod-spandsp freeswitch-mod-spy freeswitch-mod-translate \ - freeswitch-mod-valet-parking freeswitch-mod-flite freeswitch-mod-pocketsphinx freeswitch-mod-tts-commandline \ - freeswitch-mod-dialplan-xml freeswitch-mod-loopback freeswitch-mod-sofia freeswitch-mod-event-multicast \ - freeswitch-mod-event-socket freeswitch-mod-local-stream freeswitch-mod-native-file freeswitch-mod-sndfile \ - freeswitch-mod-tone-stream freeswitch-mod-lua freeswitch-mod-console freeswitch-mod-logfile freeswitch-mod-syslog \ - freeswitch-mod-say-en freeswitch-mod-posix-timer freeswitch-mod-timerfd freeswitch-mod-xml-cdr freeswitch-mod-shout\ - freeswitch-mod-xml-curl freeswitch-mod-xml-rpc freeswitch-conf-vanilla freeswitch-mod-vlc freeswitch-mod-verto \ - freeswitch-mod-sms freeswitch-timezones freeswitch-mod-bert freeswitch-mod-basic freeswitch-mod-lcr freeswitch-mod-rtc \ - freeswitch-mod-commands freeswitch-mod-cdr-csv + freeswitch-mod-distributor freeswitch-mod-dptools freeswitch-mod-enum freeswitch-mod-esf freeswitch-mod-esl freeswitch-mod-expr \ + freeswitch-mod-fsv freeswitch-mod-hash freeswitch-mod-memcache freeswitch-mod-portaudio freeswitch-mod-portaudio-stream \ + freeswitch-mod-spandsp freeswitch-mod-spy freeswitch-mod-translate freeswitch-mod-valet-parking freeswitch-mod-flite \ + freeswitch-mod-pocketsphinx freeswitch-mod-tts-commandline freeswitch-mod-dialplan-xml freeswitch-mod-loopback freeswitch-mod-sofia \ + freeswitch-mod-event-multicast freeswitch-mod-event-socket freeswitch-mod-local-stream freeswitch-mod-native-file freeswitch-mod-sndfile \ + freeswitch-mod-tone-stream freeswitch-mod-lua freeswitch-mod-console freeswitch-mod-logfile freeswitch-mod-syslog freeswitch-mod-say-en \ + freeswitch-mod-posix-timer freeswitch-mod-timerfd freeswitch-mod-xml-cdr freeswitch-mod-shout freeswitch-mod-xml-curl freeswitch-mod-xml-rpc \ + freeswitch-conf-vanilla freeswitch-mod-vlc freeswitch-mod-verto freeswitch-mod-sms freeswitch-timezones freeswitch-mod-bert \ + freeswitch-mod-basic freeswitch-mod-lcr freeswitch-mod-rtc freeswitch-mod-commands freeswitch-mod-cdr-csv freeswitch-mod-png + freeswitch-mod-g723.1 freeswitch-mod-amr freeswitch-mod-b64 freeswitch-mod-opus freeswitch-mod-httapi freeswitch-mod-voicemail #setup language / sound files for use #if [[ $freeswitch_sounds_language == "en-ca" ]]; then