diff --git a/src/freedombone-template b/src/freedombone-template index fd052dff..4a244da5 100755 --- a/src/freedombone-template +++ b/src/freedombone-template @@ -36,6 +36,7 @@ app_repo="TODO" app_repo_commit='TODO' app_php= app_node= +app_nodeapp= app_onion_only= app_port= app_port_internal= @@ -63,6 +64,7 @@ function show_help { echo $' --port [number] Port number for the app' echo $' --portinternal [number] Internal port between a daemon and the web server' echo $' --node [yes|no] Is this a nodejs app?' + 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 $' -s --daemon [yes|no] Add a daemon' @@ -116,6 +118,10 @@ do shift app_node="$1" ;; + --nodeapp) + shift + app_nodeapp="$1" + ;; -s|--daemon|--systemd) shift if [[ "$1" == 'yes' ]]; then @@ -193,6 +199,10 @@ if [[ "$your_email" != *'@'* ]]; then exit 8 fi +if [ "$app_nodeapp" ]; then + app_node='yes' +fi + if [ ! $app_webui ]; then if [ ! "$app_dir" ]; then app_dir=/etc/${app_name} @@ -600,6 +610,9 @@ fi if [[ "$app_node" == 'yes' ]]; then echo "install_nodejs ${app_name}" fi +if [ "$app_nodeapp" ]; then + echo "npm install -g ${app_nodeapp}" +fi if [[ "$app_php" == 'yes' ]]; then echo ' apt-get -yq install php-gettext php-curl php-gd php-mysql git curl' echo ' apt-get -yq install memcached php-memcached php-intl exiftool libfcgi0ldbl'