##// END OF EJS Templates
Rename init scripts and fix references inside them
Bradley M. Kuhn -
r4190:99ad9d0a kallithea-2.2.5-r...
parent child Browse files
Show More
@@ -20,7 +20,7 b' Upgrading from PyPI (aka "Cheeseshop")'
20 20 If using a sqlite database, stop the Rhodecode process/daemon/service, and
21 21 then make a copy of the database file::
22 22
23 service rhodecode stop
23 service kallithea stop
24 24 cp rhodecode.db rhodecode.db.{version}
25 25
26 26
@@ -90,7 +90,7 b' readily apparent::'
90 90
91 91 Once that is complete, you may now start your upgraded Rhodecode Instance::
92 92
93 service rhodecode start
93 service kallithea start
94 94
95 95 Or::
96 96
@@ -1,19 +1,19 b''
1 # celeryd - run the celeryd daemon as an upstart job for rhodecode
1 # celeryd - run the celeryd daemon as an upstart job for kallithea
2 2 # Change variables/paths as necessary and place file /etc/init/celeryd.conf
3 3 # start/stop/restart as normal upstart job (ie: $ start celeryd)
4 4
5 5 description "Celery for RhodeCode Mercurial Server"
6 6 author "Matt Zuba <matt.zuba@goodwillaz.org"
7 7
8 start on starting rhodecode
9 stop on stopped rhodecode
8 start on starting kallithea
9 stop on stopped kallithea
10 10
11 11 respawn
12 12
13 13 umask 0022
14 14
15 15 env PIDFILE=/tmp/celeryd.pid
16 env APPINI=/var/hg/rhodecode/production.ini
16 env APPINI=/var/hg/kallithea/production.ini
17 17 env HOME=/var/hg
18 18 env USER=hg
19 19 # To use group (if different from user), you must edit sudoers file and change
@@ -21,7 +21,7 b' env USER=hg'
21 21 # env GROUP=hg
22 22
23 23 script
24 COMMAND="/var/hg/.virtualenvs/rhodecode/bin/paster celeryd $APPINI --pidfile=$PIDFILE"
24 COMMAND="/var/hg/.virtualenvs/kallithea/bin/paster celeryd $APPINI --pidfile=$PIDFILE"
25 25 if [ -z "$GROUP" ]; then
26 26 exec sudo -u $USER $COMMAND
27 27 else
@@ -6,7 +6,7 b''
6 6 . /etc/rc.conf
7 7 . /etc/rc.d/functions
8 8
9 DAEMON=rhodecode
9 DAEMON=kallithea
10 10 APP_HOMEDIR="/srv"
11 11 APP_PATH="$APP_HOMEDIR/$DAEMON"
12 12 CONF_NAME="production.ini"
@@ -4,16 +4,16 b''
4 4 ########################################
5 5
6 6 ### BEGIN INIT INFO
7 # Provides: rhodecode
7 # Provides: kallithea
8 8 # Required-Start: $all
9 9 # Required-Stop: $all
10 10 # Default-Start: 2 3 4 5
11 11 # Default-Stop: 0 1 6
12 # Short-Description: starts instance of rhodecode
13 # Description: starts instance of rhodecode using start-stop-daemon
12 # Short-Description: starts instance of kallithea
13 # Description: starts instance of kallithea using start-stop-daemon
14 14 ### END INIT INFO
15 15
16 APP_NAME="rhodecode"
16 APP_NAME="kallithea"
17 17 APP_HOMEDIR="opt"
18 18 APP_PATH="/$APP_HOMEDIR/$APP_NAME"
19 19
@@ -3,8 +3,8 b''
3 3 #### THIS IS AN GENTOO INIT.D SCRIPT####
4 4 ########################################
5 5
6 APP_NAME="rhodecode"
7 APP_HOMEDIR="marcink/python_workspace"
6 APP_NAME="kallithea"
7 APP_HOMEDIR="username/python_workspace"
8 8 APP_PATH="/home/$APP_HOMEDIR/$APP_NAME"
9 9
10 10 CONF_NAME="production.ini"
@@ -14,7 +14,7 b' LOG_PATH="$APP_PATH/$APP_NAME.log"'
14 14
15 15 PYTHON_PATH="/home/$APP_HOMEDIR/v-env"
16 16
17 RUN_AS="marcink"
17 RUN_AS="username"
18 18
19 19 DAEMON="$PYTHON_PATH/bin/paster"
20 20
@@ -12,7 +12,7 b''
12 12 ##################################################
13 13
14 14
15 APP_NAME="rhodecode"
15 APP_NAME="kallithea"
16 16 # the location of your app
17 17 # since this is a web app, it should go in /var/www
18 18 APP_PATH="/var/www/$APP_NAME"
@@ -22,14 +22,14 b' CONF_NAME="production.ini"'
22 22 # write to wherever the PID should be stored, just ensure
23 23 # that the user you run paster as has the appropriate permissions
24 24 # same goes for the log file
25 PID_PATH="/var/run/rhodecode/pid"
26 LOG_PATH="/var/log/rhodecode/rhodecode.log"
25 PID_PATH="/var/run/kallithea/pid"
26 LOG_PATH="/var/log/kallithea/kallithea.log"
27 27
28 28 # replace this with the path to the virtual environment you
29 29 # made for RhodeCode
30 PYTHON_PATH="/opt/python_virtualenvironments/rhodecode-venv"
30 PYTHON_PATH="/opt/python_virtualenvironments/kallithea-venv"
31 31
32 RUN_AS="rhodecode"
32 RUN_AS="kallithea"
33 33
34 34 DAEMON="$PYTHON_PATH/bin/paster"
35 35
@@ -39,7 +39,7 b' DAEMON_OPTS="serve --daemon \\'
39 39 --pid-file=$PID_PATH \
40 40 --log-file=$LOG_PATH $APP_PATH/$CONF_NAME"
41 41
42 DESC="rhodecode-server"
42 DESC="kallithea-server"
43 43 LOCK_FILE="/var/lock/subsys/$APP_NAME"
44 44
45 45 # source CentOS init functions
@@ -61,7 +61,7 b' ensure_pid_dir () {'
61 61 fi
62 62 }
63 63
64 start_rhodecode () {
64 start_kallithea () {
65 65 ensure_pid_dir
66 66 PYTHON_EGG_CACHE="/tmp" daemon --pidfile $PID_PATH \
67 67 --user $RUN_AS "$DAEMON $DAEMON_OPTS"
@@ -70,7 +70,7 b' start_rhodecode () {'
70 70 return $RETVAL
71 71 }
72 72
73 stop_rhodecode () {
73 stop_kallithea () {
74 74 if [ -e $LOCK_FILE ]; then
75 75 killproc -p $PID_PATH
76 76 RETVAL=$?
@@ -82,7 +82,7 b' stop_rhodecode () {'
82 82 return $RETVAL
83 83 }
84 84
85 status_rhodecode() {
85 status_kallithea() {
86 86 if [ -e $LOCK_FILE ]; then
87 87 # exit with non-zero to indicate failure
88 88 RETVAL=1
@@ -92,25 +92,25 b' status_rhodecode() {'
92 92 return $RETVAL
93 93 }
94 94
95 restart_rhodecode () {
96 stop_rhodecode
97 start_rhodecode
95 restart_kallithea () {
96 stop_kallithea
97 start_kallithea
98 98 RETVAL=$?
99 99 }
100 100
101 101 case "$1" in
102 102 start)
103 103 echo -n $"Starting $DESC: "
104 start_rhodecode
104 start_kallithea
105 105 echo
106 106 ;;
107 107 stop)
108 108 echo -n $"Stopping $DESC: "
109 stop_rhodecode
109 stop_kallithea
110 110 echo
111 111 ;;
112 112 status)
113 status_rhodecode
113 status_kallithea
114 114 RETVAL=$?
115 115 if [ ! $RETVAL -eq 0 ]; then
116 116 echo "RhodeCode server is running..."
@@ -120,7 +120,7 b' case "$1" in'
120 120 ;;
121 121 restart)
122 122 echo -n $"Restarting $DESC: "
123 restart_rhodecode
123 restart_kallithea
124 124 echo
125 125 ;;
126 126 *)
@@ -1,6 +1,6 b''
1 # rhodecode - run the rhodecode daemon as an upstart job
2 # Change variables/paths as necessary and place file /etc/init/rhodecode.conf
3 # start/stop/restart as normal upstart job (ie: $ start rhodecode)
1 # kallithea - run the kallithea daemon as an upstart job
2 # Change variables/paths as necessary and place file /etc/init/kallithea.conf
3 # start/stop/restart as normal upstart job (ie: $ start kallithea)
4 4
5 5 description "RhodeCode Mercurial Server"
6 6 author "Matt Zuba <matt.zuba@goodwillaz.org"
@@ -12,14 +12,14 b' respawn'
12 12
13 13 umask 0022
14 14
15 env PIDFILE=/var/hg/rhodecode/rhodecode.pid
16 env LOGFILE=/var/hg/rhodecode/log/rhodecode.log
17 env APPINI=/var/hg/rhodecode/production.ini
15 env PIDFILE=/var/hg/kallithea/kallithea.pid
16 env LOGFILE=/var/hg/kallithea/log/kallithea.log
17 env APPINI=/var/hg/kallithea/production.ini
18 18 env HOME=/var/hg
19 19 env USER=hg
20 20 env GROUP=hg
21 21
22 exec /var/hg/.virtualenvs/rhodecode/bin/paster serve --user=$USER --group=$GROUP --pid-file=$PIDFILE --log-file=$LOGFILE $APPINI
22 exec /var/hg/.virtualenvs/kallithea/bin/paster serve --user=$USER --group=$GROUP --pid-file=$PIDFILE --log-file=$LOGFILE $APPINI
23 23
24 24 post-stop script
25 25 rm -f $PIDFILE
@@ -9,21 +9,21 b' port=127.0.0.1:9001 ; (ip_address'
9 9 ;password=123 ; (default is no password (open server))
10 10
11 11 [supervisord]
12 logfile=/%(here)s/supervisord_rhodecode.log ; (main log file;default $CWD/supervisord.log)
12 logfile=/%(here)s/supervisord_kallithea.log ; (main log file;default $CWD/supervisord.log)
13 13 logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
14 14 logfile_backups=10 ; (num of main logfile rotation backups;default 10)
15 15 loglevel=info ; (log level;default info; others: debug,warn,trace)
16 pidfile=/%(here)s/supervisord_rhodecode.pid ; (supervisord pidfile;default supervisord.pid)
16 pidfile=/%(here)s/supervisord_kallithea.pid ; (supervisord pidfile;default supervisord.pid)
17 17 nodaemon=true ; (start in foreground if true;default false)
18 18 minfds=1024 ; (min. avail startup file descriptors;default 1024)
19 19 minprocs=200 ; (min. avail process descriptors;default 200)
20 20 umask=022 ; (process file creation umask;default 022)
21 user=marcink ; (default is current user, required if root)
21 user=username ; (default is current user, required if root)
22 22 ;identifier=supervisor ; (supervisord identifier, default is 'supervisor')
23 23 ;directory=/tmp ; (default is not to cd during start)
24 24 ;nocleanup=true ; (don't clean up tempfiles at start;default false)
25 25 ;childlogdir=/tmp ; ('AUTO' child log dir, default $TEMP)
26 environment=HOME=/home/marcink ; (key value pairs to add to environment)
26 environment=HOME=/home/username ; (key value pairs to add to environment)
27 27 ;strip_ansi=false ; (strip ansi escape codes in logs; def. false)
28 28
29 29 ; the below section must remain in the config file for RPC
@@ -40,12 +40,12 b' serverurl=http://127.0.0.1:9001 ; use an'
40 40 ;history_file=~/.sc_history ; use readline history if available
41 41
42 42
43 ; restart with supervisorctl restart rhodecode:*
44 [program:rhodecode]
43 ; restart with supervisorctl restart kallithea:*
44 [program:kallithea]
45 45 numprocs = 1
46 46 numprocs_start = 5000 # possible should match ports
47 directory=/home/marcink/rhodecode-dir
48 command = /home/marcink/v-env/bin/paster serve rc.ini
47 directory=/home/username/kallithea-dir
48 command = /home/username/v-env/bin/paster serve rc.ini
49 49 process_name = %(program_name)s_%(process_num)04d
50 50 redirect_stderr=true
51 stdout_logfile=/%(here)s/rhodecode.log No newline at end of file
51 stdout_logfile=/%(here)s/kallithea.log No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now