mirror of
https://github.com/YunoHost-Apps/invidious_ynh.git
synced 2024-09-03 19:15:55 +02:00
cleaning
This commit is contained in:
parent
b19b17530c
commit
c04fcb0a4a
3 changed files with 13 additions and 41 deletions
|
@ -26,24 +26,10 @@ ynh_backup --src_path="$install_dir"
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC BACKUP
|
|
||||||
#=================================================
|
|
||||||
# BACKUP LOGROTATE
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/logrotate.d/$app"
|
ynh_backup --src_path="/etc/logrotate.d/$app"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# BACKUP SYSTEMD
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/systemd/system/$app.service"
|
ynh_backup --src_path="/etc/systemd/system/$app.service"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# BACKUP VARIOUS FILES
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/cron.d/$app"
|
ynh_backup --src_path="/etc/cron.d/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -22,11 +22,6 @@ then
|
||||||
yunohost service remove "$app"
|
yunohost service remove "$app"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# REMOVE SYSTEM CONFIGURATIONS
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Removing system configurations related to $app..." --weight=10
|
|
||||||
|
|
||||||
dpkg --remove crystal
|
dpkg --remove crystal
|
||||||
|
|
||||||
# Remove the dedicated systemd config
|
# Remove the dedicated systemd config
|
||||||
|
|
|
@ -9,12 +9,6 @@
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK VERSION
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD UPGRADE STEPS
|
# STANDARD UPGRADE STEPS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -69,24 +63,21 @@ ynh_exec_warn_less curl -fsSL https://crystal-lang.org/install.sh | bash -s -- -
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Upgrading source files..." --weight=5
|
||||||
|
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
pushd "$install_dir"
|
||||||
then
|
chown -R "$app:www-data" "$install_dir"
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=5
|
git config --system --add safe.directory "$install_dir"
|
||||||
|
ynh_exec_as "$app" git config pull.rebase false
|
||||||
|
|
||||||
|
ynh_exec_as "$app" git fetch
|
||||||
|
#git checkout master
|
||||||
|
ynh_exec_as "$app" git reset --hard --quiet "$version_commit"
|
||||||
|
ynh_exec_as "$app" git pull
|
||||||
|
ynh_exec_warn_less shards install --production
|
||||||
|
ynh_exec_warn_less crystal build "$install_dir/src/invidious.cr" --release
|
||||||
|
popd
|
||||||
|
|
||||||
pushd "$install_dir"
|
|
||||||
chown -R "$app:www-data" "$install_dir"
|
|
||||||
git config --system --add safe.directory "$install_dir"
|
|
||||||
ynh_exec_as "$app" git config pull.rebase false
|
|
||||||
|
|
||||||
ynh_exec_as "$app" git fetch
|
|
||||||
#git checkout master
|
|
||||||
ynh_exec_as "$app" git reset --hard --quiet "$version_commit"
|
|
||||||
ynh_exec_as "$app" git pull
|
|
||||||
ynh_exec_warn_less shards install --production
|
|
||||||
ynh_exec_warn_less crystal build "$install_dir/src/invidious.cr" --release
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R "$app:www-data" "$install_dir"
|
chown -R "$app:www-data" "$install_dir"
|
||||||
|
|
Loading…
Reference in a new issue