Merge pull request #711 from YunoHost/use_ynh_systemd_action

Use ynh_systemd_action
This commit is contained in:
Alexandre Aubin 2019-04-25 13:49:10 +02:00 committed by GitHub
commit e4544ea359
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -442,7 +442,7 @@ EOF
ynh_store_file_checksum "$finalfail2banjailconf"
ynh_store_file_checksum "$finalfail2banfilterconf"
systemctl try-reload-or-restart fail2ban
ynh_systemd_action --service_name=fail2ban --action=reload
local fail2ban_error="$(journalctl -u fail2ban | tail -n50 | grep "WARNING.*$app.*")"
if [[ -n "$fail2ban_error" ]]; then
@ -459,5 +459,5 @@ EOF
ynh_remove_fail2ban_config () {
ynh_secure_remove "/etc/fail2ban/jail.d/$app.conf"
ynh_secure_remove "/etc/fail2ban/filter.d/$app.conf"
systemctl try-reload-or-restart fail2ban
ynh_systemd_action --service_name=fail2ban --action=reload
}

View file

@ -280,7 +280,7 @@ ynh_psql_test_if_first_run() {
ynh_die "postgresql shoud be 9.4 or 9.6"
fi
systemctl start postgresql
ynh_systemd_action --service_name=postgresql --action=start
sudo --login --user=postgres psql -c"ALTER user postgres WITH PASSWORD '$pgsql'" postgres
@ -294,6 +294,6 @@ ynh_psql_test_if_first_run() {
yunohost service add postgresql --log "$logfile"
systemctl enable postgresql
systemctl reload postgresql
ynh_systemd_action --service_name=postgresql --action=reload
fi
}