mirror of
https://github.com/YunoHost-Apps/nitter_ynh.git
synced 2024-09-03 19:46:24 +02:00
Tweak permissions
This commit is contained in:
parent
fa670c6fdd
commit
a546fb8736
3 changed files with 9 additions and 13 deletions
|
@ -107,7 +107,7 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$final_path"
|
ynh_setup_source --dest_dir="$final_path"
|
||||||
|
|
||||||
ynh_setup_source --source_id="nim_$arch" --dest_dir="$final_path/.nim" || ynh_die --message="Your server's architecture is not supported"
|
ynh_setup_source --source_id="nim_$arch" --dest_dir="$final_path/nim-installation" || ynh_die --message="Your server's architecture is not supported"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
|
@ -134,8 +134,8 @@ usermod -d $final_path $app 2>&1
|
||||||
ynh_script_progression --message="Compiling Nitter..." --weight=30
|
ynh_script_progression --message="Compiling Nitter..." --weight=30
|
||||||
pushd "$final_path" || ynh_die
|
pushd "$final_path" || ynh_die
|
||||||
chown -R $app:$app $final_path
|
chown -R $app:$app $final_path
|
||||||
sudo -u $app "PATH=/opt/yunohost/$app/.nim/bin:$(sudo -u $app sh -c 'echo $PATH')" $final_path/.nim/bin/nimble build -d:release -y
|
sudo -u $app "PATH=/opt/yunohost/$app/nim-installation/bin:$(sudo -u $app sh -c 'echo $PATH')" $final_path/nim-installation/bin/nimble build -d:release -y
|
||||||
sudo -u $app "PATH=/opt/yunohost/$app/.nim/bin:$(sudo -u $app sh -c 'echo $PATH')" $final_path/.nim/bin/nimble scss -y
|
sudo -u $app "PATH=/opt/yunohost/$app/nim-installation/bin:$(sudo -u $app sh -c 'echo $PATH')" $final_path/nim-installation/bin/nimble scss -y
|
||||||
mkdir -p $final_path/tmp
|
mkdir -p $final_path/tmp
|
||||||
chown -R root:root $final_path
|
chown -R root:root $final_path
|
||||||
popd || ynh_die
|
popd || ynh_die
|
||||||
|
@ -161,8 +161,7 @@ ynh_add_config --template="nitter.conf" --destination="$final_path/nitter.conf"
|
||||||
# Set permissions to app files
|
# Set permissions to app files
|
||||||
chown -R root:$app $final_path
|
chown -R root:$app $final_path
|
||||||
chown -R $app:$app $final_path/tmp
|
chown -R $app:$app $final_path/tmp
|
||||||
chmod -R o-rwx $final_path
|
chmod -R g=u,g-w,o-rwx $final_path
|
||||||
chmod -R g-w $final_path
|
|
||||||
setfacl -n -m user:www-data:rx $final_path
|
setfacl -n -m user:www-data:rx $final_path
|
||||||
setfacl -n -R -m user:www-data:rx -m default:user:www-data:rx $final_path/public
|
setfacl -n -R -m user:www-data:rx -m default:user:www-data:rx $final_path/public
|
||||||
|
|
||||||
|
|
|
@ -80,8 +80,7 @@ ynh_install_app_dependencies $pkg_dependencies
|
||||||
# Restore permissions on app files
|
# Restore permissions on app files
|
||||||
chown -R root:$app $final_path
|
chown -R root:$app $final_path
|
||||||
chown -R $app:$app $final_path/tmp
|
chown -R $app:$app $final_path/tmp
|
||||||
chmod -R o-rwx $final_path
|
chmod -R g=u,g-w,o-rwx $final_path
|
||||||
chmod -R g-w $final_path
|
|
||||||
setfacl -n -m user:www-data:rx $final_path
|
setfacl -n -m user:www-data:rx $final_path
|
||||||
setfacl -n -R -m user:www-data:rx -m default:user:www-data:rx $final_path/public
|
setfacl -n -R -m user:www-data:rx -m default:user:www-data:rx $final_path/public
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ then
|
||||||
mv "$final_path/nitter.conf" "$final_path/nitter.conf.bak"
|
mv "$final_path/nitter.conf" "$final_path/nitter.conf.bak"
|
||||||
ynh_setup_source --dest_dir="$final_path"
|
ynh_setup_source --dest_dir="$final_path"
|
||||||
mv "$final_path/nitter.conf.bak" "$final_path/nitter.conf"
|
mv "$final_path/nitter.conf.bak" "$final_path/nitter.conf"
|
||||||
ynh_setup_source --source_id="nim_$arch" --dest_dir="$final_path/.nim" || ynh_die --message="Your server's architecture is not supported"
|
ynh_setup_source --source_id="nim_$arch" --dest_dir="$final_path/nim-installation" || ynh_die --message="Your server's architecture is not supported"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -108,8 +108,8 @@ usermod -d $final_path $app 2>&1
|
||||||
ynh_script_progression --message="Compiling Nitter..." --weight=30
|
ynh_script_progression --message="Compiling Nitter..." --weight=30
|
||||||
pushd "$final_path" || ynh_die
|
pushd "$final_path" || ynh_die
|
||||||
chown -R $app:$app $final_path
|
chown -R $app:$app $final_path
|
||||||
sudo -u $app "PATH=/opt/yunohost/$app/.nim/bin:$(sudo -u $app sh -c 'echo $PATH')" $final_path/.nim/bin/nimble build -d:release -y
|
sudo -u $app "PATH=/opt/yunohost/$app/nim-installation/bin:$(sudo -u $app sh -c 'echo $PATH')" $final_path/nim-installation/bin/nimble build -d:release -y
|
||||||
sudo -u $app "PATH=/opt/yunohost/$app/.nim/bin:$(sudo -u $app sh -c 'echo $PATH')" $final_path/.nim/bin/nimble scss -y
|
sudo -u $app "PATH=/opt/yunohost/$app/nim-installation/bin:$(sudo -u $app sh -c 'echo $PATH')" $final_path/nim-installation/bin/nimble scss -y
|
||||||
mkdir -p $final_path/tmp
|
mkdir -p $final_path/tmp
|
||||||
chown -R root:root $final_path
|
chown -R root:root $final_path
|
||||||
popd || ynh_die
|
popd || ynh_die
|
||||||
|
@ -136,11 +136,9 @@ ynh_add_config --template="nitter.conf" --destination="$final_path/nitter.conf"
|
||||||
# Set permissions on app files
|
# Set permissions on app files
|
||||||
chown -R root:$app $final_path
|
chown -R root:$app $final_path
|
||||||
chown -R $app:$app $final_path/tmp
|
chown -R $app:$app $final_path/tmp
|
||||||
chmod -R o-rwx $final_path
|
chmod -R g=u,g-w,o-rwx $final_path
|
||||||
chmod -R g-w $final_path
|
|
||||||
setfacl -n -m user:www-data:rx $final_path
|
setfacl -n -m user:www-data:rx $final_path
|
||||||
setfacl -n -R -m user:www-data:rx -m default:user:www-data:rx $final_path/public
|
setfacl -n -R -m user:www-data:rx -m default:user:www-data:rx $final_path/public
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INTEGRATE SERVICE IN YUNOHOST
|
# INTEGRATE SERVICE IN YUNOHOST
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue