mirror of
https://github.com/YunoHost-Apps/seafile_ynh.git
synced 2024-09-03 20:26:01 +02:00
Fix helper call
This commit is contained in:
parent
73fc252d8f
commit
9f50f2539e
6 changed files with 19 additions and 18 deletions
|
@ -41,7 +41,7 @@ ynh_backup "/var/log/$app"
|
||||||
# Backup mysql
|
# Backup mysql
|
||||||
ynh_print_info "Backing up database"
|
ynh_print_info "Backing up database"
|
||||||
ynh_mysql_dump_db > "${YNH_CWD}"/seafiledb.dmp
|
ynh_mysql_dump_db > "${YNH_CWD}"/seafiledb.dmp
|
||||||
ynh_mysql_dump_db --database=ccnetdb > "${YNH_CWD}"/ccnetdb.dmp
|
ynh_mysql_dump_db ccnetdb > "${YNH_CWD}"/ccnetdb.dmp
|
||||||
ynh_mysql_dump_db --database=seahubdb > "${YNH_CWD}"/seahubdb.dmp
|
ynh_mysql_dump_db seahubdb > "${YNH_CWD}"/seahubdb.dmp
|
||||||
|
|
||||||
ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
||||||
|
|
|
@ -54,8 +54,9 @@ sleep 2
|
||||||
|
|
||||||
# Reload services
|
# Reload services
|
||||||
ynh_script_progression "Starting services..."
|
ynh_script_progression "Starting services..."
|
||||||
ynh_systemctl --service=seafile -l "spawned seaf-server, pid " -p /var/log/seafile/controller.log
|
ynh_systemctl --service=seafile --wait_until="spawned seaf-server, pid " --log_path=/var/log/seafile/controller.log
|
||||||
ynh_systemctl --service=seahub -l "Started Seafile hub." -p "systemd"
|
sleep 2
|
||||||
|
ynh_systemctl --service=seahub --wait_until="Started Seafile hub." --log_path="systemd"
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
ynh_script_progression "Change of URL completed for $app" --time=
|
ynh_script_progression "Change of URL completed for $app" --time=
|
||||||
|
|
|
@ -39,8 +39,8 @@ install_source
|
||||||
# init databases
|
# init databases
|
||||||
ynh_script_progression "Configuring MySQL database..."
|
ynh_script_progression "Configuring MySQL database..."
|
||||||
db_user=seafile
|
db_user=seafile
|
||||||
ynh_''mysql_setup_db --db_user="$db_user" --db_name=ccnetdb --db_pwd="$db_pwd"
|
ynh_''mysql_create_db ccnetdb "$db_user" "$db_pwd"
|
||||||
ynh_''mysql_setup_db --db_user="$db_user" --db_name=seahubdb --db_pwd="$db_pwd"
|
ynh_''mysql_create_db seahubdb "$db_user" "$db_pwd"
|
||||||
|
|
||||||
ynh_script_progression "Configuring application..."
|
ynh_script_progression "Configuring application..."
|
||||||
|
|
||||||
|
@ -135,9 +135,9 @@ set_permission
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|
||||||
ynh_script_progression "Starting seafile services..."
|
ynh_script_progression "Starting seafile services..."
|
||||||
ynh_systemctl --service=seafile -l "spawned seaf-server, pid " -p /var/log/seafile/controller.log
|
ynh_systemctl --service=seafile --wait_until="spawned seaf-server, pid " --log_path=/var/log/seafile/controller.log
|
||||||
sleep 2
|
sleep 2
|
||||||
ynh_systemctl --service=seahub -l "Started Seafile hub." -p "systemd"
|
ynh_systemctl --service=seahub --wait_until="Started Seafile hub." --log_path="systemd"
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
ynh_script_progression "Installation of $app completed"
|
ynh_script_progression "Installation of $app completed"
|
||||||
|
|
|
@ -36,9 +36,8 @@ ynh_safe_rm /opt/yunohost/"$app"
|
||||||
|
|
||||||
# Remove databases
|
# Remove databases
|
||||||
ynh_script_progression "Removing databases..."
|
ynh_script_progression "Removing databases..."
|
||||||
db_helper=ynh_"mysql"_remove_db
|
ynh_''mysql_drop_db ccnetdb
|
||||||
$db_helper --db_name ccnetdb --db_user seafile
|
ynh_''mysql_drop_db seahubdb
|
||||||
$db_helper --db_name seahubdb --db_user seafile
|
|
||||||
|
|
||||||
# Remove systemd service
|
# Remove systemd service
|
||||||
ynh_script_progression "Removing systemd units..."
|
ynh_script_progression "Removing systemd units..."
|
||||||
|
|
|
@ -25,9 +25,8 @@ ynh_script_progression "Restoring files..."
|
||||||
ynh_restore_everything
|
ynh_restore_everything
|
||||||
# Restore mysql dump
|
# Restore mysql dump
|
||||||
ynh_script_progression "Restoring database..."
|
ynh_script_progression "Restoring database..."
|
||||||
db_helper=ynh_"mysql"_setup_db
|
ynh_''mysql_create_db ccnetdb "$db_user" "$db_pwd"
|
||||||
$db_helper --db_user "$db_user" --db_name ccnetdb --db_pwd "$db_pwd"
|
ynh_''mysql_create_db seahubdb "$db_user" "$db_pwd"
|
||||||
$db_helper --db_user "$db_user" --db_name seahubdb --db_pwd "$db_pwd"
|
|
||||||
su -c "mysql -u ${app} -p$db_pwd $db_name < ${YNH_CWD}/seafiledb.dmp"
|
su -c "mysql -u ${app} -p$db_pwd $db_name < ${YNH_CWD}/seafiledb.dmp"
|
||||||
su -c "mysql -u ${app} -p$db_pwd ccnetdb < ${YNH_CWD}/ccnetdb.dmp"
|
su -c "mysql -u ${app} -p$db_pwd ccnetdb < ${YNH_CWD}/ccnetdb.dmp"
|
||||||
su -c "mysql -u ${app} -p$db_pwd seahubdb < ${YNH_CWD}/seahubdb.dmp"
|
su -c "mysql -u ${app} -p$db_pwd seahubdb < ${YNH_CWD}/seahubdb.dmp"
|
||||||
|
@ -67,8 +66,9 @@ sleep 5
|
||||||
|
|
||||||
# Restart service
|
# Restart service
|
||||||
ynh_script_progression "Starting seafile services..."
|
ynh_script_progression "Starting seafile services..."
|
||||||
ynh_systemctl --service=seafile -l "spawned seaf-server, pid " -p /var/log/seafile/controller.log
|
ynh_systemctl --service=seafile --wait_until="spawned seaf-server, pid " --log_path=/var/log/seafile/controller.log
|
||||||
ynh_systemctl --service=seahub -l "Started Seafile hub." -p "systemd"
|
sleep 2
|
||||||
|
ynh_systemctl --service=seahub --wait_until="Started Seafile hub." --log_path="systemd"
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
ynh_script_progression "Restoration completed for $app"
|
ynh_script_progression "Restoration completed for $app"
|
||||||
|
|
|
@ -206,8 +206,9 @@ yunohost service add seahub --description 'Seafile server web interface.'
|
||||||
ynh_script_progression "Starting seafile services..."
|
ynh_script_progression "Starting seafile services..."
|
||||||
sleep 5
|
sleep 5
|
||||||
ynh_systemctl --service=memcached.service -p "systemd"
|
ynh_systemctl --service=memcached.service -p "systemd"
|
||||||
ynh_systemctl --service=seafile -l "spawned seaf-server, pid " -p /var/log/seafile/controller.log
|
ynh_systemctl --service=seafile --wait_until="spawned seaf-server, pid " --log_path=/var/log/seafile/controller.log
|
||||||
ynh_systemctl --service=seahub -l "Started Seafile hub." -p "systemd"
|
sleep 2
|
||||||
|
ynh_systemctl --service=seahub --wait_until="Started Seafile hub." --log_path="systemd"
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
# remove old version files
|
# remove old version files
|
||||||
|
|
Loading…
Reference in a new issue