This commit is contained in:
Bob Mottram 2018-05-15 12:29:36 +01:00
commit a4c761059b
12 changed files with 649 additions and 165 deletions

View File

@ -18,10 +18,11 @@ Suppose you have some internet application which you want to add to the system.
There's a command which you can use to generate scripts for new apps. Some examples are as follows:
To create a script for a generic PHP plus MySql/MariaDB web app:
To create a script for a generic PHP plus MySql/MariaDB web app with a couple of extra packages:
#+begin_src bash
freedombone-template --app [name] -e [email] -r [repo url] \
--packages "cowsay libssl-dev" \
-c [commit] --php yes -d mariadb > \
src/freedombone-app-myappname
#+end_src

Binary file not shown.

View File

@ -39,6 +39,7 @@ GIT_CODE=
GIT_ONION_PORT=8090
GIT_ADMIN_PASSWORD=
GOGS_BIN=
GOGS_PORT=3145
gogs_variables=(ONION_ONLY
GIT_ADMIN_PASSWORD
@ -596,7 +597,7 @@ function install_gogs {
echo ' location / {'; } >> "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
function_check nginx_limits
nginx_limits "${GIT_DOMAIN_NAME}" '10G'
{ echo ' proxy_pass http://localhost:3000;';
{ echo " proxy_pass http://localhost:${GOGS_PORT};";
echo ' }';
echo '';
echo ' fastcgi_buffers 64 4K;';
@ -628,7 +629,7 @@ function install_gogs {
echo ' location / {'; } >> "/etc/nginx/sites-available/${GIT_DOMAIN_NAME}"
function_check nginx_limits
nginx_limits "${GIT_DOMAIN_NAME}" '10G'
{ echo ' proxy_pass http://localhost:3000;';
{ echo " proxy_pass http://localhost:${GOGS_PORT};";
echo ' }';
echo '';
echo ' fastcgi_buffers 64 4K;';
@ -713,7 +714,7 @@ function install_gogs {
echo "DOMAIN = ${GIT_ONION_HOSTNAME}" >> ${GOGS_CONFIG_FILE}
echo "ROOT_URL = http://$GIT_DOMAIN_NAME/" >> ${GOGS_CONFIG_FILE}
fi
{ echo 'HTTP_PORT = 3000';
{ echo "HTTP_PORT = ${GOGS_PORT}";
echo "SSH_PORT = $SSH_PORT";
echo 'SSH_DOMAIN = %(DOMAIN)s';
echo "CERT_FILE = /etc/ssl/certs/${GIT_DOMAIN_NAME}.pem";

View File

@ -35,7 +35,7 @@ MAILPILE_DOMAIN_NAME=
MAILPILE_CODE=
MAILPILE_ONION_PORT=8103
MAILPILE_REPO="https://github.com/mailpile/Mailpile"
MAILPILE_COMMIT='f82074d2ab5ccd65d14a6b3c6cd65aeb132831d7'
MAILPILE_COMMIT='3f6ab53de90f85bca8c52e5511e78cd7aca5ef1f'
MAILPILE_PORT=33411
mailpile_variables=(MAILPILE_REPO
@ -105,6 +105,7 @@ function upgrade_mailpile {
pip install -r requirements.txt
chown -R mailpile:mailpile "/var/www/$MAILPILE_DOMAIN_NAME/mail"
systemctl restart mailpile
}
function backup_local_mailpile {
@ -171,6 +172,7 @@ function install_mailpile {
fi
apt-get -yq install python-pip python-lxml python-dev libjpeg-dev
apt-get -yq install openssl python-pgpdump python-cryptography libssl-dev
if [ ! -d /var/www/$MAILPILE_DOMAIN_NAME ]; then
mkdir /var/www/$MAILPILE_DOMAIN_NAME

View File

@ -38,8 +38,9 @@ NEXTCLOUD_CODE=
NEXTCLOUD_ONION_PORT=8112
NEXTCLOUD_REPO="https://github.com/nextcloud/server"
# Stable 13 branch
NEXTCLOUD_COMMIT='b16824db31cd00e26e72216bf995d52389b9c93c'
NEXTCLOUD_COMMIT='edd5712c6ead5b09fa4f996cfda66fc4e18ba597'
NEXTCLOUD_ADMIN_PASSWORD=
NEXTCLOUD_SERVER_SIDE_ENCRYPTION=1
nextcloud_variables=(ONION_ONLY
NEXTCLOUD_DOMAIN_NAME
@ -83,6 +84,16 @@ function install_interactive_nextcloud {
ONION_ONLY='no'
fi
dialog --title $"Enable NextCloud server side encryption" \
--backtitle $"Freedombone Configuration" \
--yesno $"\\nDo you want to enable server side encryption. On ARM or older x86 systems, especially without HRNG, this may make performance excessively slow?" 10 60
sel=$?
case $sel in
1) NEXTCLOUD_SERVER_SIDE_ENCRYPTION=
;;
255) return;;
esac
if [[ $ONION_ONLY != "no" ]]; then
NEXTCLOUD_DOMAIN_NAME='nextcloud.local'
else
@ -668,12 +679,14 @@ function install_nextcloud_main {
sudo -u www-data ./occ check
sudo -u www-data ./occ status
sudo -u www-data ./occ app:list
sudo -u www-data ./occ app:enable encryption
if ! sudo -u www-data ./occ encryption:enable; then
echo $'Encryption not enabled'
exit 73527
if [ $NEXTCLOUD_SERVER_SIDE_ENCRYPTION ]; then
sudo -u www-data ./occ app:enable encryption
if ! sudo -u www-data ./occ encryption:enable; then
echo $'Encryption not enabled'
exit 73527
fi
sudo -u www-data ./occ encryption:status
fi
sudo -u www-data ./occ encryption:status
sudo -u www-data ./occ config:system:set appstoreenabled --value=false
chmod g+w "/var/www/${NEXTCLOUD_DOMAIN_NAME}/htdocs/config/config.php"
chown -R www-data:www-data "/var/www/${NEXTCLOUD_DOMAIN_NAME}/htdocs"

View File

@ -55,6 +55,7 @@ function secure_privatebin {
chown -R ${rootuser}:${htgroup} "${pbpath}/"
chown -R www-data:www-data "${pbdata}"
chmod 755 "${pbdata}"
}
function logging_on_privatebin {
@ -153,15 +154,16 @@ function reconfigure_privatebin {
}
function upgrade_privatebin {
if grep -q "privatebin domain" "$COMPLETION_FILE"; then
PRIVATEBIN_DOMAIN_NAME=$(get_completion_param "privatebin domain")
fi
chmod 755 "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/data"
CURR_PRIVATEBIN_COMMIT=$(get_completion_param "privatebin commit")
if [[ "$CURR_PRIVATEBIN_COMMIT" == "$PRIVATEBIN_COMMIT" ]]; then
return
fi
if grep -q "privatebin domain" "$COMPLETION_FILE"; then
PRIVATEBIN_DOMAIN_NAME=$(get_completion_param "privatebin domain")
fi
# update to the next commit
function_check set_repo_commit
set_repo_commit "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs" "privatebin commit" "$PRIVATEBIN_COMMIT" "$PRIVATEBIN_REPO"
@ -436,8 +438,6 @@ function install_privatebin {
sed -i 's|; qrcode|qrcode|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
sed -i 's|default =.*|default = "1day"|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
sed -i 's|languagedefault =.*|languagedefault = "en"|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
sed -i 's|1week =|; 1week =|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
sed -i 's|1month =|; 1month =|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
sed -i 's|1year =|; 1year =|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
sed -i 's|never =|; never =|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"
sed -i 's|limit = 10|limit = 30|g' "/var/www/$PRIVATEBIN_DOMAIN_NAME/htdocs/cfg/conf.php"

357
src/freedombone-app-rocketchat Executable file
View File

@ -0,0 +1,357 @@
#!/bin/bash
#
# _____ _ _
# | __|___ ___ ___ _| |___ _____| |_ ___ ___ ___
# | __| _| -_| -_| . | . | | . | . | | -_|
# |__| |_| |___|___|___|___|_|_|_|___|___|_|_|___|
#
# Freedom in the Cloud
#
# License
# =======
#
# Copyright (C) 2018 Bob Mottram <bob@freedombone.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
VARIANTS='full full-vim'
IN_DEFAULT_INSTALL=0
SHOW_ON_ABOUT=1
ROCKETCHAT_DOMAIN_NAME=
ROCKETCHAT_CODE=
ROCKETCHAT_ONION_PORT=9722
ROCKETCHAT_PORT_INTERNAL=3000
rocketchat_variables=(ONION_ONLY
ROCKETCHAT_DOMAIN_NAME
ROCKETCHAT_CODE
DDNS_PROVIDER
MY_USERNAME)
function logging_on_rocketchat {
echo -n ''
}
function logging_off_rocketchat {
echo -n ''
}
function remove_user_rocketchat {
remove_username="$1"
"${PROJECT_NAME}-pass" -u "$remove_username" --rmapp rocketchat
}
function add_user_rocketchat {
new_username="$1"
new_user_password="$2"
"${PROJECT_NAME}-pass" -u "$new_username" -a rocketchat -p "$new_user_password"
echo '0'
}
function install_interactive_rocketchat {
if [ ! "$ONION_ONLY" ]; then
ONION_ONLY='no'
fi
if [[ "$ONION_ONLY" != "no" ]]; then
ROCKETCHAT_DOMAIN_NAME='rocketchat.local'
write_config_param "ROCKETCHAT_DOMAIN_NAME" "$ROCKETCHAT_DOMAIN_NAME"
else
interactive_site_details "rocketchat" "ROCKETCHAT_DOMAIN_NAME" "ROCKETCHAT_CODE"
fi
APP_INSTALLED=1
}
function change_password_rocketchat {
curr_username="$1"
new_user_password="$2"
read_config_param 'ROCKETCHAT_DOMAIN_NAME'
"${PROJECT_NAME}-pass" -u "$curr_username" -a rocketchat -p "$new_user_password"
}
function reconfigure_rocketchat {
# This is used if you need to switch identity. Dump old keys and generate new ones
echo -n ''
}
function configure_interactive_rocketchat {
W=(1 $"Option 1"
2 $"Option 2")
while true
do
# shellcheck disable=SC2068
selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"rocketchat" --menu $"Choose an operation, or ESC for main menu:" 14 70 3 "${W[@]}" 3>&2 2>&1 1>&3)
if [ ! "$selection" ]; then
break
fi
case $selection in
1) # call some function for option 1
;;
2) # call some function for option 2
;;
esac
done
}
function upgrade_rocketchat {
echo -n ''
}
function backup_local_rocketchat {
ROCKETCHAT_DOMAIN_NAME='rocketchat'
if grep -q "rocketchat domain" "$COMPLETION_FILE"; then
ROCKETCHAT_DOMAIN_NAME=$(get_completion_param "rocketchat domain")
fi
source_directory=/var/snap/rocketchat-server
suspend_site "${ROCKETCHAT_DOMAIN_NAME}"
systemctl stop rocketchat
dest_directory=rocketchat
backup_directory_to_usb "$source_directory" $dest_directory
restart_site
systemctl start rocketchat
}
function restore_local_rocketchat {
if ! grep -q "rocketchat domain" "$COMPLETION_FILE"; then
return
fi
ROCKETCHAT_DOMAIN_NAME=$(get_completion_param "rocketchat domain")
if [ ! "$ROCKETCHAT_DOMAIN_NAME" ]; then
return
fi
suspend_site "${ROCKETCHAT_DOMAIN_NAME}"
systemctl stop rocketchat
temp_restore_dir=/root/temprocketchat
rocketchat_dir=/var/snap/rocketchat-server
restore_directory_from_usb $temp_restore_dir rocketchat
if [ -d $temp_restore_dir ]; then
if [ -d "$temp_restore_dir$rocketchat_dir" ]; then
cp -rp "$temp_restore_dir$rocketchat_dir"/* "$rocketchat_dir"/
else
if [ ! -d "$rocketchat_dir" ]; then
mkdir "$rocketchat_dir"
fi
cp -rp "$temp_restore_dir"/* "$rocketchat_dir"/
fi
rm -rf $temp_restore_dir
fi
systemctl start rocketchat
restart_site
}
function backup_remote_rocketchat {
ROCKETCHAT_DOMAIN_NAME='rocketchat'
if grep -q "rocketchat domain" "$COMPLETION_FILE"; then
ROCKETCHAT_DOMAIN_NAME=$(get_completion_param "rocketchat domain")
fi
source_directory=/var/snap/rocketchat-server
suspend_site "${ROCKETCHAT_DOMAIN_NAME}"
systemctl stop rocketchat
dest_directory=rocketchat
backup_directory_to_friend "$source_directory" $dest_directory
systemctl start rocketchat
restart_site
}
function restore_remote_rocketchat {
if ! grep -q "rocketchat domain" "$COMPLETION_FILE"; then
return
fi
ROCKETCHAT_DOMAIN_NAME=$(get_completion_param "rocketchat domain")
if [ ! "$ROCKETCHAT_DOMAIN_NAME" ]; then
return
fi
suspend_site "${ROCKETCHAT_DOMAIN_NAME}"
systemctl stop rocketchat
temp_restore_dir=/root/temprocketchat
rocketchat_dir=/var/snap/rocketchat-server
restore_directory_from_friend $temp_restore_dir rocketchat
if [ -d $temp_restore_dir ]; then
if [ -d "$temp_restore_dir$rocketchat_dir" ]; then
cp -rp "$temp_restore_dir$rocketchat_dir"/* "$rocketchat_dir"/
else
if [ ! -d "$rocketchat_dir" ]; then
mkdir "$rocketchat_dir"
fi
cp -rp $temp_restore_dir/* "$rocketchat_dir"/
fi
rm -rf $temp_restore_dir
fi
systemctl start rocketchat
restart_site
}
function remove_rocketchat {
nginx_dissite "$ROCKETCHAT_DOMAIN_NAME"
remove_certs "$ROCKETCHAT_DOMAIN_NAME"
remove_nodejs rocketchat
if [ -d "/var/www/$ROCKETCHAT_DOMAIN_NAME" ]; then
rm -rf "/var/www/$ROCKETCHAT_DOMAIN_NAME"
fi
if [ -f "/etc/nginx/sites-available/$ROCKETCHAT_DOMAIN_NAME" ]; then
rm "/etc/nginx/sites-available/$ROCKETCHAT_DOMAIN_NAME"
fi
remove_onion_service rocketchat "${ROCKETCHAT_ONION_PORT}"
if grep -q "rocketchat" /etc/crontab; then
sed -i "/rocketchat/d" /etc/crontab
fi
remove_app rocketchat
remove_completion_param install_rocketchat
sed -i '/rocketchat/d' "$COMPLETION_FILE"
remove_ddns_domain "$ROCKETCHAT_DOMAIN_NAME"
snap remove rocketchat-server
}
function install_rocketchat {
apt-get -qy install snapd
snap install rocketchat-server
install_nodejs rocketchat
if [ ! "$ROCKETCHAT_DOMAIN_NAME" ]; then
echo $'No domain name was given'
exit 3568356
fi
if [ -d "/var/www/$ROCKETCHAT_DOMAIN_NAME/htdocs" ]; then
rm -rf "/var/www/$ROCKETCHAT_DOMAIN_NAME/htdocs"
fi
mkdir -p "/var/www/$ROCKETCHAT_DOMAIN_NAME/htdocs"
chmod g+w "/var/www/$ROCKETCHAT_DOMAIN_NAME/htdocs"
chown -R www-data:www-data "/var/www/$ROCKETCHAT_DOMAIN_NAME/htdocs"
add_ddns_domain "$ROCKETCHAT_DOMAIN_NAME"
ROCKETCHAT_ONION_HOSTNAME=$(add_onion_service rocketchat 80 "${ROCKETCHAT_ONION_PORT}")
rocketchat_nginx_site=/etc/nginx/sites-available/$ROCKETCHAT_DOMAIN_NAME
if [[ "$ONION_ONLY" == "no" ]]; then
nginx_http_redirect "$ROCKETCHAT_DOMAIN_NAME" "index index.html"
{ echo 'server {';
echo ' listen 443 ssl;';
echo ' #listen [::]:443 ssl;';
echo " server_name $ROCKETCHAT_DOMAIN_NAME;";
echo ''; } >> "$rocketchat_nginx_site"
nginx_compress "$ROCKETCHAT_DOMAIN_NAME"
echo '' >> "$rocketchat_nginx_site"
echo ' # Security' >> "$rocketchat_nginx_site"
nginx_ssl "$ROCKETCHAT_DOMAIN_NAME"
nginx_security_options "$ROCKETCHAT_DOMAIN_NAME"
{ echo ' add_header Strict-Transport-Security max-age=15768000;';
echo '';
echo ' # Logs';
echo ' access_log /dev/null;';
echo ' error_log /dev/null;';
echo '';
echo ' # Root';
echo " root /var/www/$ROCKETCHAT_DOMAIN_NAME/htdocs;";
echo '';
echo ' index index.html;';
echo ' # Location';
echo ' location / {'; } >> "$rocketchat_nginx_site"
nginx_limits "$ROCKETCHAT_DOMAIN_NAME" '15m'
{ echo " proxy_pass http://localhost:$ROCKETCHAT_PORT_INTERNAL;";
echo ' proxy_http_version 1.1;';
echo " proxy_set_header Upgrade \$http_upgrade;";
echo " proxy_set_header Connection \"upgrade\";"
echo " proxy_set_header Host \$http_host;"
echo '';
echo " proxy_set_header X-Real-IP \$remote_addr;";
echo " proxy_set_header X-Forward-For \$proxy_add_x_forwarded_for;";
echo ' proxy_set_header X-Forward-Proto http;';
echo ' proxy_set_header X-Nginx-Proxy true;';
echo '';
echo ' proxy_redirect off;';
echo ' }';
echo '}'; } >> "$rocketchat_nginx_site"
else
echo -n '' > "$rocketchat_nginx_site"
fi
{ echo 'server {';
echo " listen 127.0.0.1:$ROCKETCHAT_ONION_PORT default_server;";
echo " server_name $ROCKETCHAT_ONION_HOSTNAME;";
echo ''; } >> "$rocketchat_nginx_site"
nginx_compress "$ROCKETCHAT_DOMAIN_NAME"
echo '' >> "$rocketchat_nginx_site"
nginx_security_options "$ROCKETCHAT_DOMAIN_NAME"
{ echo '';
echo ' # Logs';
echo ' access_log /dev/null;';
echo ' error_log /dev/null;';
echo '';
echo ' # Root';
echo " root /var/www/$ROCKETCHAT_DOMAIN_NAME/htdocs;";
echo '';
echo ' index index.html;';
echo ' # Location';
echo ' location / {'; } >> "$rocketchat_nginx_site"
nginx_limits "$ROCKETCHAT_DOMAIN_NAME" '15m'
{ echo " proxy_pass http://localhost:$ROCKETCHAT_PORT_INTERNAL;";
echo ' proxy_http_version 1.1;';
echo " proxy_set_header Upgrade \$http_upgrade;";
echo " proxy_set_header Connection \"upgrade\";"
echo " proxy_set_header Host \$http_host;"
echo '';
echo " proxy_set_header X-Real-IP \$remote_addr;";
echo " proxy_set_header X-Forward-For \$proxy_add_x_forwarded_for;";
echo ' proxy_set_header X-Forward-Proto http;';
echo ' proxy_set_header X-Nginx-Proxy true;';
echo '';
echo ' proxy_redirect off;';
echo ' }';
echo '}'; } >> "$rocketchat_nginx_site"
create_site_certificate "$ROCKETCHAT_DOMAIN_NAME" 'yes'
nginx_ensite "$ROCKETCHAT_DOMAIN_NAME"
systemctl restart nginx
"${PROJECT_NAME}-pass" -u "$MY_USERNAME" -a rocketchat -p "$ROCKETCHAT_ADMIN_PASSWORD"
set_completion_param "rocketchat domain" "$ROCKETCHAT_DOMAIN_NAME"
APP_INSTALLED=1
}
# NOTE: deliberately there is no "exit 0"

View File

@ -1661,7 +1661,7 @@ image_install_inadyn() {
mkdir -p "$rootdir/root/build"
fi
chroot "$rootdir" apt-get -yq install build-essential curl libgnutls28-dev automake1.11 libconfuse-dev
chroot "$rootdir" apt-get -yq install gnutls-dev libconfuse-dev pkg-config libssl-dev
chroot "$rootdir" apt-get -yq install gnutls-dev libconfuse-dev pkg-config
if [ -d /repos/inadyn ]; then
mkdir "$rootdir/root/build/inadyn"
@ -1683,7 +1683,7 @@ image_install_inadyn() {
{ echo '#!/bin/bash';
echo 'cd ~/build/inadyn';
echo './autogen.sh';
echo './configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-openssl';
echo './configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var';
echo 'make -j5';
echo 'make install-strip'; } > "$rootdir/root/build/build_inadyn.sh"
chmod +x "$rootdir/root/build/build_inadyn.sh"

View File

@ -32,7 +32,7 @@ app_name='noapp'
app_name_lower=$(echo "${app_name}" | tr '[:upper:]' '[:lower:]')
app_name=$app_name_lower
app_name_upper=$(echo "${app_name}" | tr '[:lower:]' '[:upper:]')
app_repo="TODO"
app_repo=
app_repo_commit='TODO'
app_php=
app_node=
@ -47,6 +47,8 @@ your_name=''
your_email=''
SHOW_ON_ABOUT=1
database_type=''
debian_packages=
snap_packages=
function show_help {
echo ''
@ -67,10 +69,13 @@ function show_help {
echo $' --nodeapp [package] Specify a nodejs package to install'
echo $' -o --onion [yes|no] Is this app only available on an onion address?'
echo $' -p --php [yes|no] Is this a PHP app?'
echo $' --packages [list of deb package names] Debian packages to be installed'
echo $' --snaps [list of snap package names] Snap packages to be installed'
echo $' -s --daemon [yes|no] Add a daemon'
echo $' -d --database [mariadb|postgresql|mongodb] Type of database'
echo $' -w --web [yes|no] Whether there is a web user interface (default is yes)'
echo $' --dir [directory] Where to install to'
echo $' -i --internalport [number] Internal port number for the daemon'
echo ''
exit 0
}
@ -110,6 +115,10 @@ do
shift
database_type="$1"
;;
-i|--internal|--internalport)
shift
app_port_internal="$1"
;;
-p|--php)
shift
app_php="$1"
@ -152,6 +161,14 @@ do
shift
app_dir="$1"
;;
--packages|--package)
shift
debian_packages="$1"
;;
--snaps|--snap)
shift
snap_packages="$1"
;;
*)
# unknown option
;;
@ -251,8 +268,10 @@ if [ "$app_port" ]; then
echo "${app_name_upper}_PORT=$app_port"
fi
echo "${app_name_upper}_ONION_PORT=$(( ( RANDOM % 1000 ) + 9010 ))"
echo "${app_name_upper}_REPO=\"${app_repo}\""
echo "${app_name_upper}_COMMIT='${app_repo_commit}'"
if [ "$app_repo" ]; then
echo "${app_name_upper}_REPO=\"${app_repo}\""
echo "${app_name_upper}_COMMIT='${app_repo_commit}'"
fi
if [ $app_daemon ]; then
if [ ! "$app_port_internal" ]; then
echo "${app_name_upper}_PORT_INTERNAL=TODO"
@ -379,27 +398,31 @@ echo ' done'
echo '}'
echo ''
echo "function upgrade_${app_name} {"
echo " CURR_${app_name_upper}_COMMIT=\$(get_completion_param \"${app_name} commit\")"
echo " if [[ \"\$CURR_${app_name_upper}_COMMIT\" == \"\$${app_name_upper}_COMMIT\" ]]; then"
echo ' return'
echo ' fi'
if [ $app_webui ]; then
echo ''
echo " if grep -q \"${app_name} domain\" \"\$COMPLETION_FILE\"; then"
echo " ${app_name_upper}_DOMAIN_NAME=\$(get_completion_param \"${app_name} domain\")"
echo ' fi'
fi
echo ''
echo ' # update to the next commit'
if [ ! "$app_dir" ]; then
echo " set_repo_commit \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\" \"${app_name} commit\" \"\$${app_name_upper}_COMMIT\" \"\$${app_name_upper}_REPO\""
echo " chown -R www-data:www-data \"/var/www/\${${app_name_upper}_DOMAIN_NAME}/htdocs\""
if [ ! "$app_repo" ]; then
echo "echo -n ''"
else
echo " set_repo_commit \"${app_dir}\" \"${app_name} commit\" \"\$${app_name_upper}_COMMIT\" \"\$${app_name_upper}_REPO\""
echo " chown -R ${app_name}:${app_name} \"${app_dir}\""
fi
if [ $app_daemon ]; then
echo " systemctl restart ${app_name}"
echo " CURR_${app_name_upper}_COMMIT=\$(get_completion_param \"${app_name} commit\")"
echo " if [[ \"\$CURR_${app_name_upper}_COMMIT\" == \"\$${app_name_upper}_COMMIT\" ]]; then"
echo ' return'
echo ' fi'
if [ $app_webui ]; then
echo ''
echo " if grep -q \"${app_name} domain\" \"\$COMPLETION_FILE\"; then"
echo " ${app_name_upper}_DOMAIN_NAME=\$(get_completion_param \"${app_name} domain\")"
echo ' fi'
fi
echo ''
echo ' # update to the next commit'
if [ ! "$app_dir" ]; then
echo " set_repo_commit \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\" \"${app_name} commit\" \"\$${app_name_upper}_COMMIT\" \"\$${app_name_upper}_REPO\""
echo " chown -R www-data:www-data \"/var/www/\${${app_name_upper}_DOMAIN_NAME}/htdocs\""
else
echo " set_repo_commit \"${app_dir}\" \"${app_name} commit\" \"\$${app_name_upper}_COMMIT\" \"\$${app_name_upper}_REPO\""
echo " chown -R ${app_name}:${app_name} \"${app_dir}\""
fi
if [ $app_daemon ]; then
echo " systemctl restart ${app_name}"
fi
fi
echo '}'
echo ''
@ -710,9 +733,22 @@ if [ $app_webui ]; then
echo ''
echo " remove_ddns_domain \"\$${app_name_upper}_DOMAIN_NAME\""
fi
if [ "$snap_packages" ]; then
echo ''
echo " snap remove ${snap_packages}"
fi
echo '}'
echo ''
echo "function install_${app_name} {"
if [ "$debian_packages" ]; then
echo " apt-get -qy install ${debian_packages}"
echo ''
fi
if [ "$snap_packages" ]; then
echo ' apt-get -qy install snapd'
echo " snap install ${snap_packages}"
echo ''
fi
if [[ "$database_type" == "mariadb" || "$database_type" == "mysql" ]]; then
echo ' install_mariadb'
echo ''
@ -750,42 +786,51 @@ if [ $app_webui ]; then
echo ' fi'
fi
echo " if [ -d /repos/${app_name} ]; then"
if [ $app_webui ]; then
echo " mkdir \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\""
fi
if [ ! "$app_dir" ]; then
echo " cp -r -p /repos/${app_name}/. \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\""
echo " cd \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\" || exit 324687356"
if [ "$app_repo" ]; then
echo " if [ -d /repos/${app_name} ]; then"
if [ $app_webui ]; then
echo " mkdir \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\""
fi
if [ ! "$app_dir" ]; then
echo " cp -r -p /repos/${app_name}/. \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\""
echo " cd \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\" || exit 324687356"
else
echo " cp -r -p /repos/${app_name}/. \"${app_dir}\""
echo " cd \"${app_dir}\" || exit 36487365"
fi
echo ' git pull'
echo ' else'
if [ ! "$app_dir" ]; then
echo " git_clone \"\$${app_name_upper}_REPO\" \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\""
else
echo " git_clone \"\$${app_name_upper}_REPO\" \"${app_dir}\""
fi
echo ' fi'
echo ''
if [ ! "$app_dir" ]; then
echo " if [ ! -d \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\" ]; then"
else
echo " if [ ! -d \"${app_dir}\" ]; then"
fi
echo " echo \$'Unable to clone ${app_name} repo'"
echo ' exit 87525'
echo ' fi'
echo ''
else
echo " cp -r -p /repos/${app_name}/. \"${app_dir}\""
echo " cd \"${app_dir}\" || exit 36487365"
echo " mkdir -p \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\""
if [ "$app_dir" ]; then
echo " mkdir \"${app_dir}\""
fi
fi
echo ' git pull'
echo ' else'
if [ ! "$app_dir" ]; then
echo " git_clone \"\$${app_name_upper}_REPO\" \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\""
else
echo " git_clone \"\$${app_name_upper}_REPO\" \"${app_dir}\""
fi
echo ' fi'
echo ''
if [ ! "$app_dir" ]; then
echo " if [ ! -d \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\" ]; then"
else
echo " if [ ! -d \"${app_dir}\" ]; then"
fi
echo " echo \$'Unable to clone ${app_name} repo'"
echo ' exit 87525'
echo ' fi'
echo ''
if [ ! "$app_dir" ]; then
echo " cd \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\" || exit 36587356"
else
echo " cd \"${app_dir}\" || exit 3463754637"
fi
echo " git checkout \"\$${app_name_upper}_COMMIT\" -b \"\$${app_name_upper}_COMMIT\""
echo " set_completion_param \"${app_name} commit\" \"\$${app_name_upper}_COMMIT\""
if [ "$app_repo" ]; then
echo " git checkout \"\$${app_name_upper}_COMMIT\" -b \"\$${app_name_upper}_COMMIT\""
echo " set_completion_param \"${app_name} commit\" \"\$${app_name_upper}_COMMIT\""
fi
if [ $app_webui ]; then
echo ''
echo " chmod g+w \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\""
@ -828,12 +873,10 @@ if [ $app_webui ]; then
echo ''
echo " { echo ' add_header Strict-Transport-Security max-age=15768000;';"
echo " echo '';"
echo " echo ' # Logs';"
echo " echo ' access_log /dev/null;';"
echo " echo ' error_log /dev/null;';"
echo " echo ' access_log /dev/null;';"
echo " echo ' error_log /dev/null;';"
echo " echo '';"
echo " echo ' # Root';"
echo " echo \" root /var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs;\";"
echo " echo \" root /var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs;\";"
echo " echo '';"
if [[ "$app_php" == 'yes' ]]; then
echo " echo ' index index.php;';"
@ -875,12 +918,10 @@ if [ $app_webui ]; then
echo " echo '' >> \"\$${app_name}_nginx_site\""
echo " nginx_security_options \"\$${app_name_upper}_DOMAIN_NAME\""
echo " { echo '';"
echo " echo ' # Logs';"
echo " echo ' access_log /dev/null;';"
echo " echo ' error_log /dev/null;';"
echo " echo ' access_log /dev/null;';"
echo " echo ' error_log /dev/null;';"
echo " echo '';"
echo " echo ' # Root';"
echo " echo \" root /var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs;\";"
echo " echo \" root /var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs;\";"
echo " echo '';"
if [[ "$app_php" == 'yes' ]]; then
echo " echo ' index index.php;';"
@ -926,7 +967,7 @@ if [ $app_daemon ]; then
echo " echo 'Description=${app_name}';"
echo " echo 'After=syslog.target';"
echo " echo 'After=network.target';"
echo " echo 'Documentation=${app_name_upper}_REPO";
echo " echo \"Documentation=\$${app_name_upper}_REPO\";";
echo " echo '';"
echo " echo '[Service]';"
echo " echo 'Type=simple';"

View File

@ -229,10 +229,7 @@ function add_ddns_domain {
echo '}'; } > "${INADYN_CONFIG_FILE}"
fi
if ! grep -q "$CURRENT_DDNS_DOMAIN" "${INADYN_CONFIG_FILE}"; then
DDNS_HOSTNAMES=$(grep 'hostname ' "${INADYN_CONFIG_FILE}"| awk -F '{' '{print $2}' | sed 's| }||g')
sed -i "s|hostname .*|hostname = {${DDNS_HOSTNAMES}, ${CURRENT_DDNS_DOMAIN} }|g" "${INADYN_CONFIG_FILE}"
fi
sed -i "s|hostname .*|hostname = $DEFAULT_DOMAIN_NAME"
chmod 600 "${INADYN_CONFIG_FILE}"
systemctl daemon-reload

View File

@ -449,18 +449,6 @@ function upgrade_inadyn_config {
read_config_param DEFAULT_DOMAIN_NAME
grep "alias " "${INADYN_CONFIG_FILE}" | sed 's| alias ||g' > ~/.inadyn_existing_sites
DDNS_HOSTNAMES=
while read -r host; do
if [ "$DDNS_HOSTNAMES" ]; then
DDNS_HOSTNAMES="$DDNS_HOSTNAMES, $host"
else
DDNS_HOSTNAMES="$host"
fi
done <~/.inadyn_existing_sites
if [ ! "$DDNS_HOSTNAMES" ]; then
return
fi
if [[ "$DDNS_PROVIDER" == "default@freedns.afraid.org" ]]; then
DDNS_PROVIDER='freedns'
@ -525,7 +513,7 @@ function install_dynamicdns {
# https version 1.99.8
apt-get -yq install build-essential curl libgnutls28-dev automake1.11
apt-get -yq install gnutls-dev libconfuse-dev pkg-config libssl-dev
apt-get -yq install gnutls-dev libconfuse-dev pkg-config
if [ ! -d "$INSTALL_DIR/inadyn" ]; then
if [ -d /repos/inadyn ]; then
@ -548,7 +536,7 @@ function install_dynamicdns {
./autogen.sh
if ! ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-openssl; then
if ! ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var; then
exit 74890
fi
if ! make -j5; then

View File

@ -3,26 +3,33 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title></title>
<!-- 2018-04-12 Thu 18:23 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="generator" content="Org-mode" />
<meta name="author" content="Bob Mottram" />
<meta name="description" content="Freedombone developers guide"
<!-- 2018-05-14 Mon 19:43 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>&lrm;</title>
<meta name="generator" content="Org mode" />
<meta name="author" content="Bob Mottram" />
<meta name="description" content="Freedombone developers guide"
/>
<meta name="keywords" content="freedombone, developers" />
<meta name="keywords" content="freedombone, developers" />
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
.title { text-align: center; }
.title { text-align: center;
margin-bottom: .2em; }
.subtitle { text-align: center;
font-size: medium;
font-weight: bold;
margin-top:0; }
.todo { font-family: monospace; color: red; }
.done { color: green; }
.done { font-family: monospace; color: green; }
.priority { font-family: monospace; color: orange; }
.tag { background-color: #eee; font-family: monospace;
padding: 2px; font-size: 80%; font-weight: normal; }
.timestamp { color: #bebebe; }
.timestamp-kwd { color: #5f9ea0; }
.right { margin-left: auto; margin-right: 0px; text-align: right; }
.left { margin-left: 0px; margin-right: auto; text-align: left; }
.center { margin-left: auto; margin-right: auto; text-align: center; }
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
.underline { text-decoration: underline; }
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
p.verse { margin-left: 3%; }
@ -49,27 +56,111 @@
border: 1px solid black;
}
pre.src:hover:before { display: inline;}
pre.src-sh:before { content: 'sh'; }
pre.src-bash:before { content: 'sh'; }
/* Languages per Org manual */
pre.src-asymptote:before { content: 'Asymptote'; }
pre.src-awk:before { content: 'Awk'; }
pre.src-C:before { content: 'C'; }
/* pre.src-C++ doesn't work in CSS */
pre.src-clojure:before { content: 'Clojure'; }
pre.src-css:before { content: 'CSS'; }
pre.src-D:before { content: 'D'; }
pre.src-ditaa:before { content: 'ditaa'; }
pre.src-dot:before { content: 'Graphviz'; }
pre.src-calc:before { content: 'Emacs Calc'; }
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
pre.src-R:before { content: 'R'; }
pre.src-perl:before { content: 'Perl'; }
pre.src-java:before { content: 'Java'; }
pre.src-sql:before { content: 'SQL'; }
pre.src-fortran:before { content: 'Fortran'; }
pre.src-gnuplot:before { content: 'gnuplot'; }
pre.src-haskell:before { content: 'Haskell'; }
pre.src-hledger:before { content: 'hledger'; }
pre.src-java:before { content: 'Java'; }
pre.src-js:before { content: 'Javascript'; }
pre.src-latex:before { content: 'LaTeX'; }
pre.src-ledger:before { content: 'Ledger'; }
pre.src-lisp:before { content: 'Lisp'; }
pre.src-lilypond:before { content: 'Lilypond'; }
pre.src-lua:before { content: 'Lua'; }
pre.src-matlab:before { content: 'MATLAB'; }
pre.src-mscgen:before { content: 'Mscgen'; }
pre.src-ocaml:before { content: 'Objective Caml'; }
pre.src-octave:before { content: 'Octave'; }
pre.src-org:before { content: 'Org mode'; }
pre.src-oz:before { content: 'OZ'; }
pre.src-plantuml:before { content: 'Plantuml'; }
pre.src-processing:before { content: 'Processing.js'; }
pre.src-python:before { content: 'Python'; }
pre.src-R:before { content: 'R'; }
pre.src-ruby:before { content: 'Ruby'; }
pre.src-sass:before { content: 'Sass'; }
pre.src-scheme:before { content: 'Scheme'; }
pre.src-screen:before { content: 'Gnu Screen'; }
pre.src-sed:before { content: 'Sed'; }
pre.src-sh:before { content: 'shell'; }
pre.src-sql:before { content: 'SQL'; }
pre.src-sqlite:before { content: 'SQLite'; }
/* additional languages in org.el's org-babel-load-languages alist */
pre.src-forth:before { content: 'Forth'; }
pre.src-io:before { content: 'IO'; }
pre.src-J:before { content: 'J'; }
pre.src-makefile:before { content: 'Makefile'; }
pre.src-maxima:before { content: 'Maxima'; }
pre.src-perl:before { content: 'Perl'; }
pre.src-picolisp:before { content: 'Pico Lisp'; }
pre.src-scala:before { content: 'Scala'; }
pre.src-shell:before { content: 'Shell Script'; }
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
/* additional language identifiers per "defun org-babel-execute"
in ob-*.el */
pre.src-cpp:before { content: 'C++'; }
pre.src-abc:before { content: 'ABC'; }
pre.src-coq:before { content: 'Coq'; }
pre.src-groovy:before { content: 'Groovy'; }
/* additional language identifiers from org-babel-shell-names in
ob-shell.el: ob-shell is the only babel language using a lambda to put
the execution function name together. */
pre.src-bash:before { content: 'bash'; }
pre.src-csh:before { content: 'csh'; }
pre.src-ash:before { content: 'ash'; }
pre.src-dash:before { content: 'dash'; }
pre.src-ksh:before { content: 'ksh'; }
pre.src-mksh:before { content: 'mksh'; }
pre.src-posh:before { content: 'posh'; }
/* Additional Emacs modes also supported by the LaTeX listings package */
pre.src-ada:before { content: 'Ada'; }
pre.src-asm:before { content: 'Assembler'; }
pre.src-caml:before { content: 'Caml'; }
pre.src-delphi:before { content: 'Delphi'; }
pre.src-html:before { content: 'HTML'; }
pre.src-idl:before { content: 'IDL'; }
pre.src-mercury:before { content: 'Mercury'; }
pre.src-metapost:before { content: 'MetaPost'; }
pre.src-modula-2:before { content: 'Modula-2'; }
pre.src-pascal:before { content: 'Pascal'; }
pre.src-ps:before { content: 'PostScript'; }
pre.src-prolog:before { content: 'Prolog'; }
pre.src-simula:before { content: 'Simula'; }
pre.src-tcl:before { content: 'tcl'; }
pre.src-tex:before { content: 'TeX'; }
pre.src-plain-tex:before { content: 'Plain TeX'; }
pre.src-verilog:before { content: 'Verilog'; }
pre.src-vhdl:before { content: 'VHDL'; }
pre.src-xml:before { content: 'XML'; }
pre.src-nxml:before { content: 'XML'; }
/* add a generic configuration mode; LaTeX export needs an additional
(add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
pre.src-conf:before { content: 'Configuration File'; }
table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
caption.t-bottom { caption-side: bottom; }
td, th { vertical-align:top; }
th.right { text-align: center; }
th.left { text-align: center; }
th.center { text-align: center; }
td.right { text-align: right; }
td.left { text-align: left; }
td.center { text-align: center; }
th.org-right { text-align: center; }
th.org-left { text-align: center; }
th.org-center { text-align: center; }
td.org-right { text-align: right; }
td.org-left { text-align: left; }
td.org-center { text-align: center; }
dt { font-weight: bold; }
.footpara:nth-child(2) { display: inline; }
.footpara { display: block; }
.footpara { display: inline; }
.footdef { margin-bottom: 1em; }
.figure { padding: 1em; }
.figure p { text-align: center; }
@ -89,6 +180,7 @@
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
.org-info-js_search-highlight
{ background-color: #ffff00; color: #000000; font-weight: bold; }
.org-svg { width: 90%; }
/*]]>*/-->
</style>
<link rel="stylesheet" type="text/css" href="freedombone.css" />
@ -97,7 +189,7 @@
@licstart The following is the entire license notice for the
JavaScript code in this tag.
Copyright (C) 2012-2013 Free Software Foundation, Inc.
Copyright (C) 2012-2017 Free Software Foundation, Inc.
The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
@ -144,28 +236,27 @@ for the JavaScript code in this tag.
<a name="top" id="top"></a>
</div>
<div id="content">
<h1 class="title"></h1>
<div class="figure">
<p><img src="images/logo.png" alt="logo.png" width="80%" height="10%" align="center" />
</p>
</div>
<div id="outline-container-sec-1" class="outline-2">
<h2 id="sec-1">Developers Guide</h2>
<div id="outline-container-orgd0bf853" class="outline-2">
<h2 id="orgd0bf853">Developers Guide</h2>
</div>
<div id="outline-container-sec-2" class="outline-2">
<h2 id="sec-2">Introduction</h2>
<div class="outline-text-2" id="text-2">
<div id="outline-container-orgaedd476" class="outline-2">
<h2 id="orgaedd476">Introduction</h2>
<div class="outline-text-2" id="text-orgaedd476">
<p>
Freedombone consists of a set of bash scripts. There are a lot of them, but they're not very complicated. If you're familiar with the GNU/Linux commandline and can hack a bash script then you can probably add a new app or fix a bug in the system. There are no trendy development frameworks to learn or to get in your way. You might also want to consult the <a href="./codeofconduct.html">Code of Conduct</a>, and there is a Matrix room at <b>#fbone:matrix.freedombone.net</b>
</p>
</div>
</div>
<div id="outline-container-sec-3" class="outline-2">
<h2 id="sec-3">Adding extra apps</h2>
<div class="outline-text-2" id="text-3">
<div id="outline-container-org3e1ecd6" class="outline-2">
<h2 id="org3e1ecd6">Adding extra apps</h2>
<div class="outline-text-2" id="text-org3e1ecd6">
<p>
Suppose you have some internet application which you want to add to the system. To do this you need to create an app script which tells the system how to install/remove and also backup/restore. The script should be designed to work with the current stable version of Debian.
</p>
@ -175,13 +266,13 @@ There's a command which you can use to generate scripts for new apps. Some examp
</p>
<p>
To create a script for a generic PHP plus MySql/MariaDB web app:
To create a script for a generic PHP plus MySql/MariaDB web app with a couple of extra packages:
</p>
<div class="org-src-container">
<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] \
-c [commit] --php yes -d mariadb &gt; \
<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] <span class="org-sh-escaped-newline">\</span>
--packages <span class="org-string">"cowsay libssl-dev"</span> <span class="org-sh-escaped-newline">\</span>
-c [commit] --php yes -d mariadb &gt; <span class="org-sh-escaped-newline">\</span>
src/freedombone-app-myappname
</pre>
</div>
@ -191,10 +282,9 @@ For a Nodejs app with MySql/MariaDB database:
</p>
<div class="org-src-container">
<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] \
-c [commit] --node yes -d mariadb \
--dir /etc/myappname --daemon yes &gt; \
<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] <span class="org-sh-escaped-newline">\</span>
-c [commit] --node yes -d mariadb <span class="org-sh-escaped-newline">\</span>
--dir /etc/myappname --daemon yes &gt; <span class="org-sh-escaped-newline">\</span>
src/freedombone-app-myappname
</pre>
</div>
@ -204,10 +294,9 @@ For a Python app with Postgresql database:
</p>
<div class="org-src-container">
<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] \
-c [commit] -d postgresql \
--dir /etc/myappname --daemon yes &gt; \
<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] <span class="org-sh-escaped-newline">\</span>
-c [commit] -d postgresql <span class="org-sh-escaped-newline">\</span>
--dir /etc/myappname --daemon yes &gt; <span class="org-sh-escaped-newline">\</span>
src/freedombone-app-myappname
</pre>
</div>
@ -217,10 +306,9 @@ For a Python app without any database, communicating between the daemon and the
</p>
<div class="org-src-container">
<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] \
-c [commit] --dir /etc/myappname \
--daemon yes --portinternal 1234 &gt; \
<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] <span class="org-sh-escaped-newline">\</span>
-c [commit] --dir /etc/myappname <span class="org-sh-escaped-newline">\</span>
--daemon yes --portinternal 1234 &gt; <span class="org-sh-escaped-newline">\</span>
src/freedombone-app-myappname
</pre>
</div>
@ -230,10 +318,9 @@ For an app without any database which communicates directly on a particular port
</p>
<div class="org-src-container">
<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] \
-c [commit] --dir /etc/myappname \
--daemon yes --port 5000 &gt; \
<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] <span class="org-sh-escaped-newline">\</span>
-c [commit] --dir /etc/myappname <span class="org-sh-escaped-newline">\</span>
--daemon yes --port 5000 &gt; <span class="org-sh-escaped-newline">\</span>
src/freedombone-app-myappname
</pre>
</div>
@ -243,10 +330,9 @@ A generic PHP plus MySql/MariaDB web app which is only available on an onion add
</p>
<div class="org-src-container">
<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] \
-c [commit] --php yes -d mariadb \
--onion yes &gt; \
<pre class="src src-bash">freedombone-template --app [name] -e [email] -r [repo url] <span class="org-sh-escaped-newline">\</span>
-c [commit] --php yes -d mariadb <span class="org-sh-escaped-newline">\</span>
--onion yes &gt; <span class="org-sh-escaped-newline">\</span>
src/freedombone-app-myappname
</pre>
</div>
@ -256,7 +342,6 @@ For more details see the manpage:
</p>
<div class="org-src-container">
<pre class="src src-bash">man freedombone-template
</pre>
</div>
@ -270,7 +355,6 @@ When your new script is ready for testing you can install it with:
</p>
<div class="org-src-container">
<pre class="src src-bash">make install
</pre>
</div>
@ -285,9 +369,9 @@ Submit your working app to <b><a href="https://github.com/bashrc/freedombone/iss
</div>
</div>
<div id="outline-container-sec-4" class="outline-2">
<h2 id="sec-4">Customising mesh images</h2>
<div class="outline-text-2" id="text-4">
<div id="outline-container-org2b37622" class="outline-2">
<h2 id="org2b37622">Customising mesh images</h2>
<div class="outline-text-2" id="text-org2b37622">
<p>
If you want to make your own specially branded version of the mesh images, such as for a particular event, then to change the default desktop backgrounds edit the images within <b>img/backgrounds</b> and to change the available avatars and desktop icons edit the images within <b>img/avatars</b>. Re-create disk images using the instructions shown previously.
</p>