18

I have a Redmine installed on CentOS without GUI. I changed email configuration and a reboot is necessary.

How to restart redmine from command line?

FilippoG
  • 272
  • 1
  • 2
  • 11
  • Which application container do you use? Apache/Passenger, Thin, Webrick... And did you installed redmine from repository or manually? – DanielK Jul 09 '15 at 06:50

5 Answers5

26

Restarting Apache (if you use passenger) sometimes does not make desired effect. You can restart Redmine with creating a file:

<redmineHomeDir>/tmp/restart.txt

with content "restart". Anytime you want to restart Redmine, just "touch" this file to change its time-stamp.

touch <redmineHomeDir>/tmp/restart.txt

Redmine will restart at the next page request. This solution can be found on Redmine forums or user blogs (e.g. http://texdex.blogspot.com/2011/03/restarting-redmine-without-restarting.html)

AstraSerg
  • 465
  • 8
  • 15
mcane
  • 1,506
  • 13
  • 23
7

Depending on how you installed Redmine the restart will look differently. See the scenarios listed below:

Apache/Passenger When installing using Passenger restarting Apache restarts Redmine as well. Example:

root@myserver:~# service httpd restart

Bitnami

root@myserver:~# service bitnami restart

Others

The rule of thumb is to restart the application container. Since redmine runs in a container (ie. Passenger, Bitnami) restarting the container also restarts Redmine.

Note: This issue has been discussed on the Redmine forum. In this thread you can see restart procedures for specific installations. Link: http://www.redmine.org/boards/2/topics/6719?r=6789

Mark
  • 4,601
  • 2
  • 17
  • 28
4

according to https://www.phusionpassenger.com/library/admin/nginx/restart_app.html you can also restart the passenger applications through

passenger-config restart-app
Mr.Gosh
  • 171
  • 1
  • 9
3

I know this is an old question but I wanted to update the answer a bit.

If it's a standalone version just do in <RedmineHomeDir> touch tmp/restart.txt

if it's in docker, a more elegant solution (especially if it's sameersbn/docker-redmine) would be to NOT restart the docker container alltogheter as you'll lose any settings done to the container, and just restart the unicorn running in supervizor!

In order to do this you have to run:

supervizorctl
restart unicorn
exit

This is usually the normal path to not lose aditional configurations done in the Docker Container.

Normally all settings should be done at the creation of a Docker Container, but some settings might be done as a 'hotfix' until a later deploy.

SergeyLebedev
  • 3,433
  • 12
  • 29
Zauxst
  • 41
  • 1
  • 4
0

If you know the PID of Redmine try to stop it with kill -2 REDMINEPID and start it again as normal. You should check it with ps aux before restarting.

FrankStein
  • 65
  • 13