Template option to install snap packages

This commit is contained in:
Bob Mottram 2018-05-14 19:52:04 +01:00
parent 40f6ed2c26
commit 855816f05b
2 changed files with 15 additions and 0 deletions

Binary file not shown.

View File

@ -48,6 +48,7 @@ your_email=''
SHOW_ON_ABOUT=1 SHOW_ON_ABOUT=1
database_type='' database_type=''
debian_packages= debian_packages=
snap_packages=
function show_help { function show_help {
echo '' echo ''
@ -69,6 +70,7 @@ function show_help {
echo $' -o --onion [yes|no] Is this app only available on an onion address?' 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 $' -p --php [yes|no] Is this a PHP app?'
echo $' --packages [list of deb package names] Debian packages to be installed' 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 $' -s --daemon [yes|no] Add a daemon'
echo $' -d --database [mariadb|postgresql|mongodb] Type of database' 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 $' -w --web [yes|no] Whether there is a web user interface (default is yes)'
@ -158,6 +160,10 @@ do
shift shift
debian_packages="$1" debian_packages="$1"
;; ;;
--snaps|--snap)
shift
snap_packages="$1"
;;
*) *)
# unknown option # unknown option
;; ;;
@ -716,6 +722,10 @@ if [ $app_webui ]; then
echo '' echo ''
echo " remove_ddns_domain \"\$${app_name_upper}_DOMAIN_NAME\"" echo " remove_ddns_domain \"\$${app_name_upper}_DOMAIN_NAME\""
fi fi
if [ "$snap_packages" ]; then
echo ''
echo " snap remove ${snap_packages}"
fi
echo '}' echo '}'
echo '' echo ''
echo "function install_${app_name} {" echo "function install_${app_name} {"
@ -723,6 +733,11 @@ if [ "$debian_packages" ]; then
echo " apt-get -qy install ${debian_packages}" echo " apt-get -qy install ${debian_packages}"
echo '' echo ''
fi 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 if [[ "$database_type" == "mariadb" || "$database_type" == "mysql" ]]; then
echo ' install_mariadb' echo ' install_mariadb'
echo '' echo ''