Fix small install issues

This commit is contained in:
Josué Tille 2024-06-02 22:15:10 +02:00
parent b37246b358
commit 2bc07edb1a
No known key found for this signature in database
GPG key ID: 5F259226AD51F2F5
2 changed files with 7 additions and 4 deletions

View file

@ -47,8 +47,8 @@ install_source() {
}
set_permission() {
chown -R "$app:$app" "$install_dir"/conf
chmod -R u+rwX,g-w,o= "$install_dir"/conf
chown -R "$app:$app" "$install_dir"/{conf,ccnet}
chmod -R u+rwX,g-w,o= "$install_dir"/{conf,ccnet}
chown -R "$app:$app" "$install_dir"/seafile_image/opt/seafile
chmod -R u+rwX,g-w,o= "$install_dir"/seafile_image/opt/seafile

View file

@ -49,8 +49,11 @@ ynh_script_progression --message="Configuring application..." --weight=3
# Run install script
set_permission
ynh_replace_special_string --match_string='seafile_config.seafile_dir = seafile_config.validate_seafile_dir(seafile_dir)' \
--replace_string 'seafile_config.seafile_dir = seafile_dir' \
--target_file "$seafile_code/setup-seafile-mysql.py"
--replace_string='seafile_config.seafile_dir = seafile_dir' \
--target_file="$seafile_code/setup-seafile-mysql.py"
ynh_replace_special_string --match_string="Utils.error('Ccnet config dir \\\"%s\\\" already exists.' % ccnet_config.ccnet_dir)" \
--replace_string='patched = 1' \
--target_file="$seafile_code/setup-seafile-mysql.py"
run_seafile_cmd bash "/opt/seafile/seafile-server-$seafile_version/setup-seafile-mysql.sh" auto \
--server-name "$server_name" \
--server-ip "$domain" \