diff --git a/admin/app.py b/admin/app.py index e29ca49..3a255ad 100644 --- a/admin/app.py +++ b/admin/app.py @@ -35,6 +35,11 @@ t.env.directories=admin_t.env.directories t.env.directories.insert(1, os.path.dirname(__file__).replace('/admin', '')+'/templates/admin') t.env.directories.insert(2, '../pastafari2/templates/admin') +system_path='./ssh/' + +if hasattr(config, 'pastafari_system_path'): + system_path=config.pastafari_system_path + @admin_app.route('/webservers/servers/') def webservers(): @@ -505,7 +510,7 @@ def save_virtualhost(): #user=config_task.remote_user - ssh_key_priv='./ssh/id_rsa' + ssh_key_priv=system_path+'id_rsa' #run_task(self, server, path, name_task, codename_task, description_task, data={}, user='', password='', where_sql_server='', url='', ssh_key_priv='', ssh_key_password='', send_task=True) # user=user, password='', where_sql_server=where_sql, ssh_key_priv=ssh_key_priv, url='', data=data, send_task=True @@ -603,7 +608,7 @@ def delete_virtualhost(): sshtask=SSHTask(db) - ssh_key_priv='./ssh/id_rsa' + ssh_key_priv=system_path+'id_rsa' if not sshtask.run_task(arr_server['ip'], 'modules.apache.tasks.apache.apache.delete_vhost', 'Remove Apache virtualhost', 'remove_apache_virtualhost', 'Task for remove a virtualhost to Apache Server', {'domain': domain, 'email': config.portal_email, 'webserver_id': arr_webserver['id'], 'user': username, 'root_dir': root_dir, 'cgi_type': ''}, config_task.remote_user, '', '', url_for('admin_app.virtualhost', webserver_id=webserver_id), ssh_key_priv=ssh_key_priv, ssh_key_password='', send_task=True, ssh_port=arr_server['ssh_port']): @@ -875,7 +880,7 @@ def save_edit_virtualhost(): #user=config_task.remote_user - ssh_key_priv='./ssh/id_rsa' + ssh_key_priv=system_path+'id_rsa' #run_task(self, server, path, name_task, codename_task, description_task, data={}, user='', password='', where_sql_server='', url='', ssh_key_priv='', ssh_key_password='', send_task=True) # user=user, password='', where_sql_server=where_sql, ssh_key_priv=ssh_key_priv, url='', data=data, send_task=True @@ -951,7 +956,7 @@ def change_user_password(): sshtask=SSHTask(db) - ssh_key_priv='./ssh/id_rsa' + ssh_key_priv=system_path+'id_rsa' #'password': password diff --git a/templates/admin/virtualhosts.phtml b/templates/admin/virtualhosts.phtml index 3e749d0..abedc37 100644 --- a/templates/admin/virtualhosts.phtml +++ b/templates/admin/virtualhosts.phtml @@ -5,20 +5,25 @@ <%block name="content">

${hostname}

-

${lang('webservers', 'webservers_list', 'Webservers list')} >> ${lang('webservers', 'websites', 'Websites')}

-

${lang('webservers', 'add_new_website', 'Add new website')}

+

${_('Filter by user')}: + +

+

${_('Webservers list')} >> ${_('Websites')}

+

${_('Add new website')}

-

${lang('webservers', 'webservers_list', 'Webservers list')} >> ${lang('webservers', 'websites', 'Websites')}

+

${_('Webservers list')} >> ${_('Websites')}