mirror of
https://github.com/YunoHost-Apps/gogs_ynh.git
synced 2024-09-03 20:36:23 +02:00
fix
This commit is contained in:
parent
b8ff995b62
commit
f714d51c3f
2 changed files with 21 additions and 15 deletions
|
@ -21,8 +21,8 @@ ynh_detect_arch(){
|
|||
else
|
||||
ynh_die "Unable to detect your achitecture, please open a bug describing \
|
||||
your hardware and the result of the command \"uname -m\"." 1
|
||||
fi
|
||||
echo $architecture
|
||||
fi
|
||||
echo $architecture
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -89,6 +89,24 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
|||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir=$final_path --source_id="$architecture"
|
||||
|
||||
#=================================================
|
||||
# CREAT DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
mkdir -p "/home/$app"
|
||||
|
||||
DATADIR="/home/$app"
|
||||
|
||||
REPO_PATH="/home/$app/repositories"
|
||||
DATA_PATH="/home/$app/data"
|
||||
|
||||
# create needed directories
|
||||
mkdir -p "$final_path/data"
|
||||
mkdir -p "$final_path/custom/conf/auth.d"
|
||||
mkdir -p "/home/$app/data/avatars"
|
||||
mkdir -p "/home/$app/data/attachments"
|
||||
mkdir -p "/var/log/$app"
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
#=================================================
|
||||
|
@ -96,20 +114,9 @@ ynh_setup_source --dest_dir=$final_path --source_id="$architecture"
|
|||
# Add users
|
||||
# We can't use the official helper because we need to set the shell for the login
|
||||
test getent passwd "$app" &>/dev/null || \
|
||||
useradd -d "$DATADIR" --system --user-group "$app" --shell /bin/bash || \
|
||||
useradd -d "/home/$app" --system --user-group "$app" --shell /bin/bash || \
|
||||
ynh_die "Unable to create $app system account"
|
||||
|
||||
#=================================================
|
||||
# CREAT DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
# create needed directories
|
||||
mkdir -p "$final_path/data"
|
||||
mkdir -p "$final_path/custom/conf/auth.d"
|
||||
mkdir -p "$DATA_PATH/avatars"
|
||||
mkdir -p "$DATA_PATH/attachments"
|
||||
mkdir -p "/var/log/$app"
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
|
@ -172,7 +179,6 @@ chmod u=rwX,g=rX,o= "$final_path"
|
|||
chmod u=rwX,g=rX,o= "/home/$app"
|
||||
chmod u=rwX,g=rX,o= "/var/log/$app"
|
||||
|
||||
|
||||
# Unprotect root from SSO if public
|
||||
set_access_settings
|
||||
|
||||
|
|
Loading…
Reference in a new issue