andreapollastri / cipi

Install and manage your server like a pro! With Cipi you don’t need to be a Sys Admin to deploy and manage websites and PHP applications powered by cloud VPS.
https://cipi.andreapollastri.net
1.09k stars 223 forks source link

Restarting system services not working. #364

Closed donniewr closed 2 years ago

donniewr commented 2 years ago

Hello,

The button to restart system services are not working, I had to manually restart PHP with a command to see the change I made to my user.ini file.

I'm the only one with this issue?

andreapollastri commented 2 years ago

Hi... by default, you cannot edit any .ini file as docs explains https://cipi.sh/docs.html.

Anyway, the restart commands are:

switch ($service) { case 'nginx': $ssh->exec('sudo systemctl restart nginx.service'); break; case 'php': $ssh->exec('sudo service php8.1-fpm restart'); $ssh->exec('sudo service php8.0-fpm restart'); $ssh->exec('sudo service php7.4-fpm restart'); $ssh->exec('sudo service php7.3-fpm restart'); break; case 'mysql': $ssh->exec('sudo service mysql restart'); break; case 'redis': $ssh->exec('sudo systemctl restart redis.service'); break; case 'supervisor': $ssh->exec('service supervisor restart'); break; default: // break; }

By my side it works! If you recognize any errors let me know how to change them! Thank You

donniewr commented 2 years ago

What do you mean? my .user.ini file is working but I had to restart php using SSH instead of the control panel. It seems that the button are not restarting anything.

It's the same with nginx, I edited my nginx conf files and I had to restart it using SSH because restarting using the panel was not doing anything.

andreapollastri commented 2 years ago

Ok! I will recheck but the commands that I posted Are correctly linked to buttons!

donniewr commented 2 years ago

Ok thanks, I'll do some testing tomorrow and try to find the problem. It could be something related to permission like the issue I reported before.

donniewr commented 2 years ago

I can confirm that there is a problem, I just tested on a fresh Linode server, I edited the nginx.conf and tried the restart nginx with the button in the panel but nothing was happening. Using sudo service nginx restart worked.

andreapollastri commented 2 years ago

Ok... I'll check the problem and fix it in next release!