mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-01-25 02:07:54 +00:00
Revert "FS-8369 Debian8/CentOS7 systemd installer additions"
This reverts commit 757fa94239.
This commit is contained in:
@@ -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 " + +"
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
# /etc/default/freeswitch
|
||||
DAEMON_OPTS="-nonat"
|
||||
@@ -1,31 +0,0 @@
|
||||
[Unit]
|
||||
Description=freeswitch
|
||||
After=syslog.target network.target local-fs.target
|
||||
|
||||
[Service]
|
||||
; service
|
||||
Type=forking
|
||||
PIDFile=@rundir@/freeswitch.pid
|
||||
PermissionsStartOnly=true
|
||||
Environment="DAEMON_OPTS=-nonat"
|
||||
EnvironmentFile=-/etc/@environmentfilelocation@/freeswitch
|
||||
ExecStart=@bindir@/freeswitch -u freeswitch -g freeswitch -ncwait -rp ${DAEMON_OPTS}
|
||||
TimeoutSec=20s
|
||||
Restart=on-failure
|
||||
; exec
|
||||
User=root
|
||||
Group=daemon
|
||||
LimitCORE=infinity
|
||||
LimitNOFILE=100000
|
||||
LimitNPROC=60000
|
||||
;LimitSTACK=240
|
||||
LimitRTPRIO=infinity
|
||||
LimitRTTIME=7000000
|
||||
IOSchedulingClass=realtime
|
||||
IOSchedulingPriority=2
|
||||
CPUSchedulingPolicy=rr
|
||||
CPUSchedulingPriority=89
|
||||
UMask=0007
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -1 +0,0 @@
|
||||
d /var/run/freeswitch 0755 freeswitch freeswitch - -
|
||||
@@ -1,62 +0,0 @@
|
||||
#!/bin/bash
|
||||
# @DISTRO@ installer
|
||||
# Niek Vlessert
|
||||
|
||||
USER=`whoami`
|
||||
DISTRO=@DISTRO@
|
||||
if [ $USER != "root" ] ; then
|
||||
SUDO=`which sudo | awk -F"/" '{print $NF}'`
|
||||
if [ -z $SUDO ] ; then
|
||||
echo "No root and no sudo... please run this as root or install sudo and make sure your user has permissions to use it."
|
||||
exit
|
||||
else
|
||||
read -p "The currently active user is not root but sudo is available... do you want to install using sudo? (y/n) " -n 1 -r
|
||||
if ! [[ $REPLY =~ ^[yY]$ ]]
|
||||
then
|
||||
echo
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "This will do several things on your @DISTRO@ installation:"
|
||||
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@"
|
||||
fi
|
||||
echo "- Install systemd unit file"
|
||||
echo "- Install /etc/@environmentfilelocation@/freeswitch"
|
||||
echo
|
||||
read -p "Do you want to continue? (y/n) " -n 1 -r
|
||||
if [[ $REPLY =~ ^[yY]$ ]]
|
||||
then
|
||||
echo
|
||||
echo "Installing..."
|
||||
$SUDO groupadd freeswitch
|
||||
if DISTRO="debian8"; then
|
||||
$SUDO adduser --disabled-password --quiet --system --home @confdir@ --gecos "FreeSWITCH open source softswitch" --ingroup freeswitch freeswitch
|
||||
elif DISTRO="centos7"; then
|
||||
$SUDO adduser --system --home @confdir@ -c "FreeSWITCH open source softswitch" -g freeswitch freeswitch
|
||||
fi
|
||||
if [[ $FSPATH == *"freeswitch"* ]]
|
||||
then
|
||||
$SUDO chown -R freeswitch:freeswitch @prefix@
|
||||
$SUDO chmod -R ug=rwX,o= @prefix@
|
||||
$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
|
||||
$SUDO cp init/freeswitch.default /etc/@environmentfilelocation@/freeswitch
|
||||
$SUDO systemd-tmpfiles --clean --create
|
||||
$SUDO systemctl daemon-reload
|
||||
echo
|
||||
if [ -f @confdir@/vars.xml ] ; then
|
||||
echo "You may now start Freeswitch using 'systemctl start freeswitch'"
|
||||
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"
|
||||
fi
|
||||
Reference in New Issue
Block a user