Skip to content

Instantly share code, notes, and snippets.

@sagmor
sagmor / download-and-install.sh
Last active May 13, 2023 00:25 — forked from andrius/download-and-install.sh
Script to install Asterisk with Fax support and Adhearsion on Debian/Ubuntu
#!/bin/bash
# function to generate random password, on input requires an argument - lenght of password
genpasswd() {
local l=$1
[ "$l" == "" ] && l=20
tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs
}
# MySQL default root password
#! /bin/sh
# start / stop script for mongodb
### BEGIN INIT INFO
# Provides: mongod
# Required-Start: \$remote_fs \$syslog
# Required-Stop: \$remote_fs \$syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6