install dotnet in install_dir
This commit is contained in:
@@ -13,12 +13,6 @@ source /usr/share/yunohost/helpers
|
||||
#=================================================
|
||||
ynh_print_info --message="Declaring files to be backed up..."
|
||||
|
||||
#=================================================
|
||||
# BACKUP DOTNET
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="/opt/dotnet"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE APP MAIN DIR
|
||||
#=================================================
|
||||
|
||||
+2
-2
@@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers
|
||||
#=================================================
|
||||
ynh_script_progression --message="Stopping $app's systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
|
||||
ynh_systemd_action --service_name="$app" --action="stop" --log_path="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# MODIFY URL IN NGINX CONF
|
||||
@@ -24,7 +24,7 @@ ynh_change_url_nginx_config
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
ynh_script_progression --message="Starting $app's systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app/$app.log"
|
||||
|
||||
|
||||
+2
-13
@@ -7,25 +7,14 @@
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# INSTALL DOTNET
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing dotnet..." --weight=1
|
||||
|
||||
ynh_setup_source --source_id=dotnet --dest_dir="/opt/dotnet"
|
||||
|
||||
chmod -R o-rwx "/opt/dotnet"
|
||||
chown -R "$app:www-data" "/opt/dotnet"
|
||||
|
||||
ln -sf /opt/dotnet/dotnet /usr/bin
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Setting up source files..." --weight=1
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
ynh_setup_source --dest_dir="$install_dir/sources"
|
||||
ynh_setup_source --source_id="dotnet" --dest_dir="$install_dir/dotnet"
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R "$app:www-data" "$install_dir"
|
||||
|
||||
@@ -29,14 +29,6 @@ ynh_remove_nginx_config
|
||||
# Remove the log files
|
||||
ynh_secure_remove --file="/var/log/$app"
|
||||
|
||||
#=================================================
|
||||
# REMOVE VARIOUS FILES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing Dotnet..." --weight=1
|
||||
|
||||
ynh_secure_remove --file="/usr/bin/dotnet"
|
||||
ynh_secure_remove --file="/opt/dotnet"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
@@ -8,14 +8,6 @@
|
||||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# RESTORE DOTNET
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring dotnet..."
|
||||
|
||||
ynh_restore_file --origin_path="/opt/dotnet"
|
||||
ln -sf /opt/dotnet/dotnet /usr/bin
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
#=================================================
|
||||
|
||||
+9
-14
@@ -10,26 +10,20 @@ source /usr/share/yunohost/helpers
|
||||
#=================================================
|
||||
# STOP SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
||||
ynh_script_progression --message="Stopping $app's systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
# ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||
|
||||
#=================================================
|
||||
# INSTALL DOTNET
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating dotnet..." --weight=1
|
||||
|
||||
ynh_setup_source --source_id=dotnet --dest_dir="/opt/dotnet" --full_replace=1
|
||||
|
||||
chmod -R o-rwx "/opt/dotnet"
|
||||
chown -R "$app:www-data" "/opt/dotnet"
|
||||
|
||||
ln -sf /opt/dotnet/dotnet /usr/bin
|
||||
if [ ! -d "$install_dir/dotnet" ]; then
|
||||
# We expect legacy install in /opt
|
||||
ynh_secure_remove --file="/opt/dotnet"
|
||||
ynh_secure_remove --file="/usr/bin/dotnet"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
@@ -37,7 +31,8 @@ ln -sf /opt/dotnet/dotnet /usr/bin
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
ynh_setup_source --dest_dir="$install_dir/source" --full_replace=1
|
||||
ynh_setup_source --source_id="dotnet" --dest_dir="$install_dir/dotnet" --full_replace=1
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R "$app:www-data" "$install_dir"
|
||||
|
||||
Reference in New Issue
Block a user