FS-8369 Debian8/CentOS7 systemd installer additions

After builing Freeswitch this makes actually run it easy by offering
an installer script.

* Changes to configure.ac to detect Debian8/CentOS 7 and create installer script
* Changes to build/Makefile.am to display the option
* Added build/startup directory with templates and other files
* Deleted outdated build/freeswitch.service and tmpfiles.conf
* Unit file based on the latest systemd service file FS-8194
* Won't interfere with other platforms (afaik)
* Supports all bindir directory prefixes ./configure can have
* Detects if Debian8/CentOS7 use systemd
* Can be used with a user with sudo permissions
This commit is contained in:
Niek Vlessert 2015-10-20 23:21:50 +02:00
parent adc8f9a119
commit 757fa94239
6 changed files with 11 additions and 10 deletions

View File

@ -57,10 +57,10 @@ install:
@echo " + $(MK) samples +"
if KNOWN_INIT
@echo " + +"
@echo " + Install init scripts: +"
@echo " + --------------------- +"
@echo " + Install startup scripts: +"
@echo " + ------------------------ +"
@echo " + +"
@echo " + init/install_systemd.sh +"
@echo " + build/startup/install_systemd.sh +"
endif
@echo " + +"
@echo " + +"

View File

@ -25,7 +25,7 @@ echo "- Create user freeswitch and add it to group freeswitch"
FSPATH=@prefix@
if [[ $FSPATH == *"freeswitch"* ]]
then
echo "- Set permissions on @prefix@ and files in @bindir@"
echo "- Set permissions on @prefix@ and files in @bindir_expanded@"
fi
echo "- Install systemd unit file"
echo "- Install /etc/@environmentfilelocation@/freeswitch"
@ -45,7 +45,7 @@ then
then
$SUDO chown -R freeswitch:freeswitch @prefix@
$SUDO chmod -R ug=rwX,o= @prefix@
$SUDO chmod -R u=rwx,g=rx @bindir@/*
$SUDO chmod -R u=rwx,g=rx @bindir_expanded@/*
fi
$SUDO cp init/freeswitch.service /etc/systemd/system/
$SUDO cp init/freeswitch.tmpfile /etc/tmpfiles.d/freeswitch.conf
@ -58,5 +58,5 @@ then
else
echo "Make sure your config files are in place in @confdir@, if they are you can start Freeswitch using 'systemctl start freeswitch'"
fi
echo "Then start fs_cli by running @bindir@/fs_cli"
echo "Then start fs_cli by running @bindir_expanded@/fs_cli"
fi

View File

@ -83,7 +83,7 @@ default_certsdir="$prefix/certs"
default_fontsdir="$prefix/fonts"
default_imagesdir="$prefix/images"
bindir="$exec_prefix/bin"
eval bindir_expanded="${bindir}"
if test "${enable_fhs}" = "yes"; then
eval full_datadir="${datadir}/freeswitch"
@ -789,8 +789,9 @@ case "$host" in
AC_SUBST(DISTRO)
AC_SUBST(rundir)
AC_SUBST(environmentfilelocation)
AC_CONFIG_FILES([init/install_systemd.sh], [chmod +x init/install_systemd.sh])
AC_CONFIG_FILES([init/freeswitch.service])
AC_SUBST(bindir_expanded)
AC_CONFIG_FILES([build/startup/install_systemd.sh], [chmod +x build/startup/install_systemd.sh])
AC_CONFIG_FILES([build/startup/freeswitch.service])
fi
;;
*)