diff --git a/README.md b/README.md index d34132f..7149d6c 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,14 @@ strut_ynh Strut package for YunoHost +## Official Website: http://strut.io + +## How to report a bug ? + +You can report an issue concerning this package on the official YunoHost bug tracker : https://dev.yunohost.org . + +## About Strut + [![Facelift](https://f.cloud.github.com/assets/1009003/515405/f1003c6a-be74-11e2-84b9-14776c652afb.png)](http://strut.io) #### A GUI / Authoring Tool for ImpressJS and Bespoke.js #### @@ -12,4 +20,3 @@ Don't know what ImpressJS is? Check out the ImpressJS demo presentation: http:/ ### Start using Strut! http://strut.io/editor/ (works in Firefox, Chrome and Safari with basic support for IE10) -### Official Website: http://strut.io ### diff --git a/manifest.json b/manifest.json index 3247d14..7ac137f 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,7 @@ { "name": "Strut", "id": "strut", + "packaging_format": 1, "description": { "en": "Strut is a slide editor creating impress.js presentations.", "fr": "Strut est un éditeur de slide permetant de créer des présentation impress.js." @@ -10,6 +11,9 @@ "email": "valentin@grimaud.me" }, "multi_instance": "true", + "services": [ + "nginx" + ], "arguments": { "install" : [ { diff --git a/scripts/backup b/scripts/backup index 6ce8961..dcadfab 100644 --- a/scripts/backup +++ b/scripts/backup @@ -1,15 +1,18 @@ #!/bin/bash -APP=${!#} # The parameter $1 is the backup directory location dedicated to the app BACKUP_DIR=$1 +# The parameter $2 is theid of the app instance ex: strut__2 +APP=$2 + domain=$(sudo yunohost app setting $APP domain) # Copy the app files final_path=/var/www/$APP -sudo cp -a $final_path "${BACKUP_DIR}/www" +sudo cp -a $final_path "${BACKUP_DIR}/www" # Copy the conf files sudo mkdir -p "${BACKUP_DIR}/conf" sudo cp -a /etc/nginx/conf.d/$domain.d/$APP.conf "${BACKUP_DIR}/conf/nginx.conf" + diff --git a/scripts/install b/scripts/install index ecc1887..1493c5b 100644 --- a/scripts/install +++ b/scripts/install @@ -1,7 +1,6 @@ #!/bin/bash -APP=${!#} - +APP='strut' # Retrieve arguments domain=$1 path=$2 @@ -31,9 +30,9 @@ sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$APP.conf # Reload Nginx and regenerate SSOwat conf sudo service nginx reload -sudo yunohost app setting $APP skipped_uris -v "/" +sudo yunohost app setting $APP skipped_uris -v "/" if [ "$public_site" = "No" ]; -then - sudo yunohost app setting $APP protected_uris -v "/index.html,/scripts" +then + sudo yunohost app setting $APP protected_uris -v "/index.html,/scripts" fi sudo yunohost app ssowatconf diff --git a/scripts/remove b/scripts/remove index 926e58a..f61a3ed 100644 --- a/scripts/remove +++ b/scripts/remove @@ -1,8 +1,6 @@ #!/bin/bash -APP=${!#} +domain=$(sudo yunohost app setting strut domain) -domain=$(sudo yunohost app setting $APP domain) - -sudo rm -rf /var/www/$APP -sudo rm -f /etc/nginx/conf.d/$domain.d/$APP.conf +sudo rm -rf /var/www/strut +sudo rm -f /etc/nginx/conf.d/$domain.d/strut.conf diff --git a/scripts/restore b/scripts/restore index 66c806f..43b44a4 100644 --- a/scripts/restore +++ b/scripts/restore @@ -1,9 +1,10 @@ #!/bin/bash -APP=${!#} # The parameter $1 is the backup directory location dedicated to the app BACKUP_DIR=$1 +# The parameter $2 is the id of the app instance ex: strut__2 +APP=$2 domain=$(sudo yunohost app setting $APP domain) path=$(sudo yunohost app setting $APP path) @@ -23,7 +24,7 @@ if [ -d $final_path ]; then echo "There is already a directory: $final_path " | sudo tee /dev/stderr exit 1 fi -sudo cp -a "${BACKUP_DIR}/www" $final_path +sudo cp -a "${BACKUP_DIR}/www" $final_path sudo chown -R www-data: $final_path # Restore the conf files @@ -38,9 +39,9 @@ sudo cp -a "${BACKUP_DIR}/conf/nginx.conf" $conf sudo service nginx reload # Set ssowat config -sudo yunohost app setting $APP skipped_uris -v "/" +sudo yunohost app setting $APP skipped_uris -v "/" if [ "$public_site" = "No" ]; -then - sudo yunohost app setting $APP protected_uris -v "/index.html,/scripts" +then + sudo yunohost app setting $APP protected_uris -v "/index.html,/scripts" fi sudo yunohost app ssowatconf diff --git a/scripts/upgrade b/scripts/upgrade index 6ee8dc5..34147a6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,5 +1,5 @@ #!/bin/bash -APP=${!#} +APP='strut' # Retrieve arguments domain=$(sudo yunohost app setting $APP domain) @@ -26,9 +26,9 @@ sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$APP.conf # Reload Nginx sudo service nginx reload -sudo yunohost app setting $APP skipped_uris -v "/" +sudo yunohost app setting $APP skipped_uris -v "/" if [ "$public_site" = "No" ]; -then - sudo yunohost app setting $APP protected_uris -v "/index.html,/scripts" +then + sudo yunohost app setting $APP protected_uris -v "/index.html,/scripts" fi sudo yunohost app ssowatconf