HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=33)
-   -   Software package installer (http://www.howtoforge.com/forums/showthread.php?t=55773)

Horfic 16th January 2012 17:00

Software package installer
 
1 Attachment(s)
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!

till 17th January 2012 13:23

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.

Horfic 17th January 2012 13:38

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

till 17th January 2012 13:44

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.

Horfic 17th January 2012 18:14

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

BTW Whats with update, delete function for the ispapp?

till 17th January 2012 18:24

Quote:

Well when I do this, whats with the conf.d file?
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.

Quote:

BTW Whats with update, delete function for the ispapp?
The setup.sh script is executed for installation and update. A uninstall function is not available yet.

Horfic 17th January 2012 18:34

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

till 17th January 2012 18:40

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

Horfic 18th January 2012 08:20

.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.

till 18th January 2012 11:21

Quote:

The current package on the repo works.
Thats great to hear!

Quote:

TW there is a error in the /usr/local/ispconfig/interface/web/admin/software_update_list.php file
Thanks for the patch. I fixed that in svn stable branch.

Quote:

Than there is only more the delete function missing.
I've added this as todo in the bugtracker together with the alias and php.ini settings problem.


All times are GMT +2. The time now is 19:55.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.