mirror of
https://github.com/YunoHost-Apps/friendica_ynh.git
synced 2024-09-03 18:36:14 +02:00
Fix
This commit is contained in:
parent
de5e792c63
commit
f6ba6ad505
4 changed files with 14 additions and 9 deletions
|
@ -78,7 +78,7 @@ ynh_script_progression --message="Setting up source files..." --weight=5
|
|||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||
|
||||
# 1 - Clone stable repo
|
||||
git clone --quiet https://github.com/friendica/friendica.git -b stable "$final_path"
|
||||
git clone --quiet https://github.com/friendica/friendica.git -b stable "$final_path"
|
||||
# Reset branch to the level of update we needed
|
||||
pushd "$final_path"
|
||||
git reset --hard $version_commit
|
||||
|
@ -88,7 +88,7 @@ popd
|
|||
cp -f "$final_path/.htaccess-dist" "$final_path/.htaccess"
|
||||
|
||||
# 2 - Clone addons repo
|
||||
git clone --quiet https://github.com/friendica/friendica-addons.git -b stable "$final_path/addon"
|
||||
git clone --quiet https://github.com/friendica/friendica-addons.git -b stable "$final_path/addon"
|
||||
# Reset addons branch to the level of update we needed
|
||||
pushd "$final_path/addon"
|
||||
git reset --hard $addons_version_commit
|
||||
|
|
|
@ -68,6 +68,11 @@ ynh_script_progression --message="Removing logrotate configuration..." --weight=
|
|||
# Remove the app-specific logrotate config
|
||||
ynh_remove_logrotate
|
||||
|
||||
#=================================================
|
||||
# REMOVE CRON FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing cron file..." --weight=1
|
||||
|
||||
# Remove a cron file
|
||||
ynh_secure_remove --file="/etc/cron.d/$app"
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ ynh_restore_file --origin_path="$final_path"
|
|||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
chmod -R 775 $final_path/view/smarty3
|
||||
chmod -R 775 "$final_path/view/smarty3"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
|
|
|
@ -107,7 +107,7 @@ then
|
|||
# Check if the repo can be updated with git
|
||||
if [ `cd $final_path && git rev-parse --is-inside-work-tree` ];
|
||||
then
|
||||
# Update through git
|
||||
# Update through Git
|
||||
pushd "$final_path"
|
||||
git fetch
|
||||
git checkout stable
|
||||
|
@ -120,10 +120,10 @@ then
|
|||
git pull
|
||||
git reset --hard $addons_version_commit
|
||||
popd
|
||||
# If git is not present upgrade through manual method
|
||||
# If Git is not present upgrade through manual method
|
||||
else
|
||||
|
||||
# Create a temporary directory and backup smarty3 folder
|
||||
# Create a temporary directory and backup smarty3 folder
|
||||
tmpdir="$(mktemp -d)"
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=3
|
||||
cp -a "$final_path/view/smarty3" "$tmpdir/smarty3"
|
||||
|
@ -132,14 +132,14 @@ else
|
|||
ynh_secure_remove "$final_path"
|
||||
|
||||
# 1 - Clone stable repo
|
||||
git clone https://github.com/friendica/friendica.git -b stable "$final_path"
|
||||
git clone --quiet https://github.com/friendica/friendica.git -b stable "$final_path"
|
||||
# Reset branch to the level of update we needed
|
||||
pushd "$final_path"
|
||||
git reset --hard $version_commit
|
||||
popd
|
||||
|
||||
# 2 - Clone addons repo
|
||||
git clone https://github.com/friendica/friendica-addons.git -b stable "$final_path/addon"
|
||||
git clone --quiet https://github.com/friendica/friendica-addons.git -b stable "$final_path/addon"
|
||||
# Reset addons branch to the level of update we needed
|
||||
pushd "$final_path/addon"
|
||||
git reset --hard $addons_version_commit
|
||||
|
@ -159,7 +159,7 @@ chmod -R o-rwx "$final_path"
|
|||
chown -R $app:www-data "$final_path"
|
||||
|
||||
# 3 - some extra folders
|
||||
chmod -R 775 $final_path/view/smarty3
|
||||
chmod -R 775 "$final_path/view/smarty3"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
|
|
Loading…
Add table
Reference in a new issue