Skip to content

Instantly share code, notes, and snippets.

@monobilisim
monobilisim / caddy
Created Jan 19, 2017
Caddy init.d file for CentOS 6
View caddy
#!/bin/sh
### BEGIN INIT INFO
# Provides: caddy
# Required-Start: $local_fs $network $named $time $syslog
# Required-Stop: $local_fs $network $named $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the caddy web server
# Description: starts caddy using start-stop-daemon
### END INIT INFO
View debian8-asterisk11-freepbx13-install.sh
apt-get autoremove -y
apt-get update -y
apt-get upgrade -y
apt-get install -y asterisk asterisk-modules asterisk-mp3 asterisk-mysql asterisk-voicemail asterisk-core-sounds-en asterisk-core-sounds-en-g722 asterisk-core-sounds-en-gsm asterisk-core-sounds-en-wav
export DEBIAN_FRONTEND=noninteractive # for mariadb-server
apt-get install -y apache2 mariadb-server mariadb-client php5 php5-curl php5-cli php5-mysql php5-gd php-pear curl sox mpg123 sudo unixodbc
systemctl disable asterisk.service
systemctl stop asterisk.service
rm /var/www/html/index.html
View centos6-asterisk11-freepbx13-install.sh
###########################################################################
# CentOS 6.7 (Minimal) + Asterisk 11 + FreePBX 13 Install Script #
###########################################################################
/bin/cat <<'EOTT' >/etc/yum.repos.d/FreePBX.repo
#Core PBX Packages
[pbx]
name=pbx
mirrorlist=http://mirrorlist.freepbxdistro.org/?pbxver=10.13.66&release=6.6&arch=$basearch&repo=pbx
#baseurl=http://yum.freepbxdistro.org/pbx/10.13.66/$basearch/
gpgcheck=0
View debian8-asterisk13-freepbx13-install.sh
apt-get -y autoremove
apt-get -y update
apt-get -y upgrade
# Some Utils
apt-get install -y curl vim-nox
# PJSIP
View centos6-asterisk13-freepbx13-install.sh
###########################################################################
# CentOS 6.7 (Minimal) + Asterisk 13 + FreePBX 13 Install Script #
###########################################################################
/bin/cat <<'EOTT' >/etc/yum.repos.d/FreePBX.repo
#Core PBX Packages
[pbx]
name=pbx
mirrorlist=http://mirrorlist.freepbxdistro.org/?pbxver=10.13.66&release=6.6&arch=$basearch&repo=pbx
#baseurl=http://yum.freepbxdistro.org/pbx/10.13.66/$basearch/
gpgcheck=0
View logimza-cron.sh
#!/bin/sh
# Mono Bilisim tarafindan gelistirilmistir: http://www.mono.net.tr
#
# Bu betik GNU Genel Kamu Lisansi (GPL 3.0) ile lisanslanmistir.
# Lisansin ingilizce metnine http://www.gnu.org/licenses/gpl-3.0.txt
# adresinden ulasabilirsiniz. Lisansin turkce metnine ise
# http://ozgurlisanslar.org.tr/gpl/gpl-v3/ adresinden erisilebilir.
YESTERDAY=$(date --date "1 day ago" '+%Y%m%d')
View centos-swap.sh
#!/bin/sh
# count=4096k -> 4G
sudo dd if=/dev/zero of=/swapfile bs=1024 count=4096k
mkswap /swapfile
swapon /swapfile
chown root:root /swapfile
chmod 0600 /swapfile
sysctl vm.swappiness=10
@monobilisim
monobilisim / freepbx-install.sh
Last active Apr 13, 2020
FreePBX for Cloud
View freepbx-install.sh
# Installer Script to take a stock Centos 6.5 to a FreePBX Distro 5.211.65 release.
# Once completed you can use the upgrade scripts for version track 5.211.65
# To keep your system updated.
# Copyright 2013 Schmooze Com, Inc.
# This script is not to be copied for other use.
# This script and the finished product that is installed carries NO WARRANTY and is
# used to get your FreePBX system setup and installed. The installed product is released
View mount-check.sh
#!/bin/sh
if grep -qs '//192.168.1.4/Santral_Ses_Kaydi' /proc/mounts; then
echo "disk mount edilmis. islem yapilmadi."
else
STAMP=`date '+%Y-%m-%d %H:%M:%S'`
echo "disk mount edilmemis."
mount -o 'username=ses,password=ses' //192.168.1.4/Santral_Ses_Kaydi /mnt/monitor
echo "$STAMP: disk mount edildi." >> /var/log/mounted.log
fi
You can’t perform that action at this time.