Skip to content
Snippets Groups Projects
Commit 855816f0 authored by Bob Mottram's avatar Bob Mottram
Browse files

Template option to install snap packages

parent 40f6ed2c
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -48,6 +48,7 @@ your_email=''
SHOW_ON_ABOUT=1
database_type=''
debian_packages=
snap_packages=
function show_help {
echo ''
......@@ -69,6 +70,7 @@ function show_help {
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)'
......@@ -158,6 +160,10 @@ do
shift
debian_packages="$1"
;;
--snaps|--snap)
shift
snap_packages="$1"
;;
*)
# unknown option
;;
......@@ -716,6 +722,10 @@ 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} {"
......@@ -723,6 +733,11 @@ 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 ''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment