db hook to manage files
This commit is contained in:
@ -6,4 +6,12 @@ class Account < ApplicationRecord
|
||||
validates :password, presence: true
|
||||
validates :home_folder, presence: true
|
||||
validates :contact_email, presence: true, email_format: true
|
||||
|
||||
after_commit :update_vsftpd_files
|
||||
|
||||
def update_vsftpd_files
|
||||
vsftp = FtpConfig.new
|
||||
vsftp.build_password_list Account.all
|
||||
vsftp.build_user_configs self
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user