diff options
| author | magikcypress <cyp@rouquin.me> | 2017-04-16 16:08:42 +0200 |
|---|---|---|
| committer | magikcypress <cyp@rouquin.me> | 2017-04-16 16:08:42 +0200 |
| commit | 2be310eefa3f86efba61a6df79fa70edf8cd20e8 (patch) | |
| tree | 5c6e677f2e7dc8eda3b5f450120d8cc5a72c1d50 /scripts | |
| parent | 9bddc797b46855a64e0a4e943dd3480f84b8b5a4 (diff) | |
| download | mastodon_ynh-2be310eefa3f86efba61a6df79fa70edf8cd20e8.tar.gz mastodon_ynh-2be310eefa3f86efba61a6df79fa70edf8cd20e8.tar.bz2 mastodon_ynh-2be310eefa3f86efba61a6df79fa70edf8cd20e8.zip | |
[fix] Clear code & fix install
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/.fonctions | 5 | ||||
| -rw-r--r-- | scripts/install | 8 |
2 files changed, 4 insertions, 9 deletions
diff --git a/scripts/.fonctions b/scripts/.fonctions index 8abb720..0a148a6 100644 --- a/scripts/.fonctions +++ b/scripts/.fonctions @@ -22,7 +22,7 @@ EXIT_PROPERLY () { # Causes the script to stop in the event of an error. And cle fi # Compensates the ssowat bug that does not remove the app's input in case of installation error. - sudo sed -i "\@\"$domain$path/\":@d" /etc/ssowat/conf.json + sudo sed -i "\@\"$domain/\":@d" /etc/ssowat/conf.json if [ "$ynh_version" = "2.2" ]; then /bin/bash $script_dir/remove @@ -54,7 +54,7 @@ CHECK_PATH () { # Checks / at the beginning of the path. And his absence at the } CHECK_DOMAINPATH () { # Checks the availability of the path and domain. - sudo yunohost app checkurl $domain$path -a $app + sudo yunohost app checkurl $domain -a $app } CHECK_FINALPATH () { # Checks that the destination folder is not already in use. @@ -110,7 +110,6 @@ SETUP_SOURCE () { # Download source, decompress and copu into $final_path fi } - ### REMOVE SCRIPT REMOVE_NGINX_CONF () { # Delete nginx configuration diff --git a/scripts/install b/scripts/install index 2e68844..b78cb47 100644 --- a/scripts/install +++ b/scripts/install @@ -14,7 +14,6 @@ CLEAN_SETUP () { TRAP_ON # Active trap to stop the script if an error is detected. domain=$YNH_APP_ARG_DOMAIN -path=$YNH_APP_ARG_PATH admin_mastodon=$YNH_APP_ARG_ADMIN admin_pass=$YNH_APP_ARG_PASSWD language=$YNH_APP_ARG_LANGUAGE @@ -26,14 +25,11 @@ CHECK_VAR "$app" "app name not set" CHECK_USER "$admin_mastodon" -CHECK_PATH - CHECK_DOMAINPATH CHECK_FINALPATH ynh_app_setting_set $app domain $domain -ynh_app_setting_set $app path $path ynh_app_setting_set $app admin $admin_mastodon ynh_app_setting_set $app pass $admin_pass ynh_app_setting_set $app language $language @@ -188,12 +184,12 @@ sudo yunohost service add mastodon-streaming # Copy nginx config sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf -sudo sed -i "s@__PATH__@$path@g" /etc/nginx/conf.d/$domain.d/$app.conf -sudo sed -i "s@__FINALPATH__@$final_path@g" /etc/nginx/conf.d/$domain.d/$app.conf # Install crontab sudo cp ../conf/crontab_mastodon /etc/cron.d/$app sudo sed -i "s@__APP__@$app@g" /etc/cron.d/$app +# Restart crontab +sudo systemctl restart cron # Private or not if [ "$is_public" = "Yes" ]; |
