mirror of
https://github.com/YunoHost-Apps/nitter_ynh.git
synced 2024-09-03 19:46:24 +02:00
Don't compile Nitter as root
This commit is contained in:
parent
98bc19cac2
commit
fa670c6fdd
3 changed files with 13 additions and 8 deletions
|
@ -124,6 +124,7 @@ ynh_script_progression --message="Configuring system user..." --weight=1
|
||||||
|
|
||||||
# Create a system user
|
# Create a system user
|
||||||
ynh_system_user_create --username=$app
|
ynh_system_user_create --username=$app
|
||||||
|
usermod -d $final_path $app 2>&1
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC SETUP
|
# SPECIFIC SETUP
|
||||||
|
@ -132,10 +133,11 @@ ynh_system_user_create --username=$app
|
||||||
#=================================================
|
#=================================================
|
||||||
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
|
||||||
export PATH="$final_path/.nim/bin:$PATH"
|
chown -R $app:$app $final_path
|
||||||
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 build -d:release -y
|
||||||
nimble scss -y
|
sudo -u $app "PATH=/opt/yunohost/$app/.nim/bin:$(sudo -u $app sh -c 'echo $PATH')" $final_path/.nim/bin/nimble scss -y
|
||||||
mkdir -p ./tmp
|
mkdir -p $final_path/tmp
|
||||||
|
chown -R root:root $final_path
|
||||||
popd || ynh_die
|
popd || ynh_die
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -63,6 +63,7 @@ ynh_script_progression --message="Recreating the dedicated system user..." --wei
|
||||||
|
|
||||||
# Create the dedicated user (if not existing)
|
# Create the dedicated user (if not existing)
|
||||||
ynh_system_user_create --username=$app
|
ynh_system_user_create --username=$app
|
||||||
|
usermod -d $final_path $app 2>&1
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REINSTALL DEPENDENCIES
|
# REINSTALL DEPENDENCIES
|
||||||
|
|
|
@ -98,6 +98,7 @@ ynh_script_progression --message="Making sure dedicated system user exists..." -
|
||||||
|
|
||||||
# Create a dedicated user (if not existing)
|
# Create a dedicated user (if not existing)
|
||||||
ynh_system_user_create --username=$app
|
ynh_system_user_create --username=$app
|
||||||
|
usermod -d $final_path $app 2>&1
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC UPGRADE
|
# SPECIFIC UPGRADE
|
||||||
|
@ -106,10 +107,11 @@ ynh_system_user_create --username=$app
|
||||||
#=================================================
|
#=================================================
|
||||||
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
|
||||||
export PATH="$final_path/.nim/bin:$PATH"
|
chown -R $app:$app $final_path
|
||||||
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 build -d:release -y
|
||||||
nimble scss -y
|
sudo -u $app "PATH=/opt/yunohost/$app/.nim/bin:$(sudo -u $app sh -c 'echo $PATH')" $final_path/.nim/bin/nimble scss -y
|
||||||
mkdir -p ./tmp
|
mkdir -p $final_path/tmp
|
||||||
|
chown -R root:root $final_path
|
||||||
popd || ynh_die
|
popd || ynh_die
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue