Software package installer

Discussion in 'Developers' Forum' started by Horfic, Jan 16, 2012.

  1. Horfic

    Horfic Member

    Hi,
    I got a problem regarding the software package installer.

    The shell script works perfectly fine when I start it as root, except the message that he can't find the command for apache restart.

    When I zip everything and make it available in my repo, it gets executed and the db is created and filled, but after that there is nothing. No /usr/share/roundcube and no file at /etc/apache2/conf.d/roundcube.conf.

    So is it a permission problem or something like that?

    Repo would be http://repo.web-wack.at/ispconfig3/

    File is attached!
     

    Attached Files:

  2. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    The package manager is intended to install packages in the apps vhost and runs under the permissions of the ispapps user and group. This decision has been made for security reasons. The apps vhost root directory is in /var/www/apps/

    The problem with your package is that you try to access directories outside of the apps vhost. Also a path like /usr/share/roundcube would collide with the packages of the debian system, so I would not install a custom software package there as a simple "apt-get insall roundcube" would destrpy your installation on debian and ubuntu.

    My recommendation is that you install roundcube to /var/www/apps/roundcube. The application will then run safely under the ispapps user and group and can be accessed on port 8081.

    I will check how we can extend the apps installer to create a /webmail alias automatically.
     
  3. Horfic

    Horfic Member

    Well I already managed it to work.

    Although the restart of the webserver still doesn't work.

    Forgot to change the type to ispconfig which runs as root.

    The only issue after changing to type ispconfig is that the db isn't created automatic. So I do this now in the script too with the info from the app.ini
     
  4. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    You should really consider to install it to the apps vhost as it is intended. There are good reasons why packages of type ispconfig are disabled by default in the config file, if you enable installations by the root user, then a maliciously coded package can take over your server and cause really much damage.
     
  5. Horfic

    Horfic Member

    Well when I do this, whats with the conf.d file?

    BTW Whats with update, delete function for the ispapp?
     
  6. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    The apps vhost has already a complete configuration, so you dont need the conf.d file for apps that are installed there. The only thing that needs to be configured is an alias and as I posted above, I will see how this can be integrated in the apps installer.

    The setup.sh script is executed for installation and update. A uninstall function is not available yet.
     
  7. Horfic

    Horfic Member

    Well I have got some dir matches in the conf file which is blocking .svn files
     
  8. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Cant they be added to a .htaccess file instead? Or even better, delete the .svn directories if they exist in the setup.sh script.
     
  9. Horfic

    Horfic Member

    .htaccess is only working for apache2 so for the nginx i would need to add this to the php.ini suhosin.session.encrypt=Off

    The current package on the repo works.


    BTW there is a error in the /usr/local/ispconfig/interface/web/admin/software_update_list.php file

    Line 164
    this
    Code:
    $sql = "SELECT v1, v2, v3, v4 FROM software_update, software_update_inst WHERE software_update.software_update_id = software_update_inst.software_update_id AND server_id = 1 ORDER BY v1 DESC , v2 DESC , v3 DESC , v4 DESC LIMIT 0,1";
    has to be this
    Code:
    $sql = "SELECT v1, v2, v3, v4 FROM software_update, software_update_inst WHERE software_update.software_update_id = software_update_inst.software_update_id AND server_id = ".$server_id." ORDER BY v1 DESC , v2 DESC , v3 DESC , v4 DESC LIMIT 0,1";
    After that update works, just that it throws an error cuz it tries to create the db again during update for all server on multiserver setup.

    Than there is only more the delete function missing.
     
    Last edited: Jan 18, 2012
  10. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Thats great to hear!

    Thanks for the patch. I fixed that in svn stable branch.

    I've added this as todo in the bugtracker together with the alias and php.ini settings problem.
     
  11. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

Share This Page