freedombone-template(1)

NAME
freedombone-template - Generates new script templates for apps

SYNOPSIS
freedombone-template --app [name] -e [email] -r [repo url] -c [commit] --port [number] --portinternal [number] --node [yes|no] --onion [yes|no] --php [yes|no] --daemon [yes|no] -d [mariadb|postgresql] --dir [install directory]

DESCRIPTION
This system uses a set of scripts which describe each app with a few standardized function names. The scripts can be initially generated using this command and then filled out with any further installation details. This doesn't create a ready-to-go app, and you will very likely need to customize the resulting script.

STARDARD FUNCTIONS
Each app script has some standard functions: install_[name] This does the main installation. remove_[name] This removes the app. logging_on_[name] This turns any logging on. logging_off_[name] This turns off logging for tha app. add_user_[name] Adds a user to the app. remove_user_[name] Removes a user from the app. install_interactive_[name] Asks for domain name and other details. change_password_[name] Changes the password for a given user. reconfigure_[name] Regenerates keys for an app, to give it a new identity. configure_interactive_[name] This gets called from "App Settings" on the Administrator Control Panel, and can be used to change parameters after installation of the app. This function is optional. If you don't need to configure anything after installation then you can remove this function from the app script. upgrade_[name] Performs any upgrades and is typically run weekly. backup_local_[name] Performs a backup of the app to a USB drive. restore_local_[name] Restores app data from a USB backup. backup_remote_[name] Performs a backup of the app to another server. restore_remote_[name] Restores app data from a another server.

EXAMPLES
Create a script for a generic PHP plus MySql/MariaDB web app:
    freedombone-template --app [name] --name "my name" \
                        -e [email] -r [repo url] \
                        -c [commit] --php yes -d mariadb > \
                        src/freedombone-app-myappname For a Nodejs app with MySql/MariaDB database:
    freedombone-template --app [name] --name "my name" \
                        -e [email] -r [repo url] \
                        -c [commit] --node yes -d mariadb \
                        --dir /etc/myappname --daemon yes > \
                        src/freedombone-app-myappname For a Python app with Postgresql database:
    freedombone-template --app [name] --name "my name" \
                        -e [email] -r [repo url] \
                        -c [commit] -d postgresql --dir \
                        /etc/myappname --daemon yes > \
                        src/freedombone-app-myappname For a Python app without any database, communicating between the daemon and the web server on port 1234:
    freedombone-template --app [name] --name "my name" \
                        -e [email] -r [repo url] \
                        -c [commit] --dir /etc/myappname \
                        --daemon yes --portinternal 1234 > \
                        src/freedombone-app-myappname For an app without any database which communicates directly on a particular port through the firewall:
    freedombone-template --app [name] --name "my name" \
                        -e [email] -r [repo url] \
                        -c [commit] --dir /etc/myappname \
                        --daemon yes --port 5000 > \
                        src/freedombone-app-myappname A generic PHP plus MySql/MariaDB web app which is only available on an onion address:
    freedombone-template --app [name] --name "my name" \
                        -e [email] -r [repo url] \
                        -c [commit] --php yes -d mariadb \
                        --onion yes > src/freedombone-app-myappname

BUGS
Report bugs at https://github.com/bashrc/freedombone/issues

AUTHOR
Bob Mottram <bob@freedombone.net>
Web: https://freedombone.net