diff --git a/scripts/backup b/scripts/backup index c2bbf38..9f1f029 100755 --- a/scripts/backup +++ b/scripts/backup @@ -1,6 +1,5 @@ #!/bin/bash -#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers diff --git a/scripts/install b/scripts/install index 7a06730..ef13462 100755 --- a/scripts/install +++ b/scripts/install @@ -16,7 +16,6 @@ ynh_nodejs_install #================================================= ynh_script_progression "Setting up source files..." -# Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir=$install_dir #================================================= @@ -24,16 +23,13 @@ ynh_setup_source --dest_dir=$install_dir #================================================= ynh_script_progression "Configuring NGINX web server..." -# Create a dedicated NGINX config ynh_config_add_nginx env_path="$PATH" ynh_config_add_systemd -# FIXME Currently, the log is only redirected to syslog. mkdir -p /var/log/$app touch /var/log/$app/$app.log -#REMOVEME? Assuming ynh_config_add_logrotate is called, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app -R /var/log/$app ynh_config_add_logrotate @@ -57,8 +53,7 @@ ynh_replace --match="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.m ynh_script_progression "Installing $app..." pushd "$install_dir" - - ynh_hide_warnings npm install + ynh_hide_warnings $ynh_npm install popd #================================================= @@ -72,9 +67,6 @@ ynh_config_add --template="haste.sh" --destination="/usr/bin/$app" # SECURE FILES AND DIRECTORIES #================================================= -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 750 "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" chmod +x /usr/bin/$app #================================================= diff --git a/scripts/remove b/scripts/remove index 6a8bb3d..5e81f8e 100755 --- a/scripts/remove +++ b/scripts/remove @@ -8,17 +8,14 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression "Removing system configurations related to $app..." -# Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_hide_warnings yunohost service status $app >/dev/null then ynh_script_progression "Removing $app service integration..." yunohost service remove $app fi -# Remove the dedicated systemd config ynh_config_remove_systemd -# Remove the dedicated NGINX config ynh_config_remove_nginx ynh_config_remove_logrotate diff --git a/scripts/restore b/scripts/restore index b40ead8..96c72ea 100755 --- a/scripts/restore +++ b/scripts/restore @@ -17,8 +17,6 @@ ynh_script_progression "Restoring the app main directory..." ynh_restore "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" #================================================= # RESTORE VARIOUS FILES #================================================= @@ -42,7 +40,6 @@ chmod +x /usr/bin/$app mkdir -p /var/log/$app touch /var/log/$app/$app.log -#REMOVEME? Assuming ynh_config_add_logrotate is called, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app -R /var/log/$app #================================================= # INTEGRATE SERVICE IN YUNOHOST diff --git a/scripts/upgrade b/scripts/upgrade index 25179d1..41f3929 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,7 +15,6 @@ ynh_systemctl --service=$app --action="stop" #================================================= ynh_script_progression "Upgrading source files..." -# Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" --keep="config.js" #================================================= @@ -30,10 +29,8 @@ ynh_nodejs_install #================================================= ynh_script_progression "Upgrading NGINX web server configuration..." -# Create a dedicated NGINX config ynh_config_add_nginx -# FIXME Currently, the log is only redirected to syslog. ynh_config_add_logrotate env_path="$PATH" @@ -47,8 +44,7 @@ yunohost service add $app --description="Haste is a pastebin software" --log="/v ynh_script_progression "Installing $app..." pushd "$install_dir" - - ynh_hide_warnings npm install + ynh_hide_warnings $ynh_npm install popd #================================================= @@ -72,9 +68,6 @@ ynh_config_add --template="haste.sh" --destination="/usr/bin/$app" # SECURE FILES AND DIRECTORIES #================================================= -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 750 "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" chmod +x /usr/bin/$app #=================================================