diff --git a/build/Makefile.am b/build/Makefile.am index dbda77330e..38202826da 100644 --- a/build/Makefile.am +++ b/build/Makefile.am @@ -57,10 +57,10 @@ install: @echo " + $(MK) samples +" if KNOWN_INIT @echo " + +" - @echo " + Install startup scripts: +" - @echo " + ------------------------ +" + @echo " + Install init scripts: +" + @echo " + --------------------- +" @echo " + +" - @echo " + build/startup/install_systemd.sh +" + @echo " + init/install_systemd.sh +" endif @echo " + +" @echo " + +" diff --git a/configure.ac b/configure.ac index a1d8010a39..df050a0001 100644 --- a/configure.ac +++ b/configure.ac @@ -83,7 +83,7 @@ default_certsdir="$prefix/certs" default_fontsdir="$prefix/fonts" default_imagesdir="$prefix/images" -eval bindir_expanded="${bindir}" +bindir="$exec_prefix/bin" if test "${enable_fhs}" = "yes"; then eval full_datadir="${datadir}/freeswitch" @@ -789,9 +789,8 @@ case "$host" in AC_SUBST(DISTRO) AC_SUBST(rundir) AC_SUBST(environmentfilelocation) - 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]) + AC_CONFIG_FILES([init/install_systemd.sh], [chmod +x init/install_systemd.sh]) + AC_CONFIG_FILES([init/freeswitch.service]) fi ;; *) diff --git a/build/startup/freeswitch.default b/init/freeswitch.default similarity index 100% rename from build/startup/freeswitch.default rename to init/freeswitch.default diff --git a/build/startup/freeswitch.service.in b/init/freeswitch.service.in similarity index 100% rename from build/startup/freeswitch.service.in rename to init/freeswitch.service.in diff --git a/build/startup/freeswitch.tmpfile b/init/freeswitch.tmpfile similarity index 100% rename from build/startup/freeswitch.tmpfile rename to init/freeswitch.tmpfile diff --git a/build/startup/install_systemd.sh.in b/init/install_systemd.sh.in similarity index 91% rename from build/startup/install_systemd.sh.in rename to init/install_systemd.sh.in index 6fe5374a5c..60253a141a 100644 --- a/build/startup/install_systemd.sh.in +++ b/init/install_systemd.sh.in @@ -25,11 +25,11 @@ 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_expanded@" + echo "- Set permissions on @prefix@ and files in @bindir@" fi echo "- Install systemd unit file" echo "- Install /etc/@environmentfilelocation@/freeswitch" -echo +echo read -p "Do you want to continue? (y/n) " -n 1 -r if [[ $REPLY =~ ^[yY]$ ]] then @@ -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_expanded@/* + $SUDO chmod -R u=rwx,g=rx @bindir@/* 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_expanded@/fs_cli" + echo "Then start fs_cli by running @bindir@/fs_cli" fi