-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.rc
42 lines (34 loc) · 1.12 KB
/
setup.rc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Installer script for sysconf "actual" -*- shell-script -*-
. /usr/lib/sysconf.base/common.sh
# Install required Debian packages
_packages=
_packages="$_packages nginx spawn-fcgi"
_packages="$_packages mysql-server"
sysconf_require_packages $_packages
sysconf_require_packages -t wheezy-backports redmine redmine-mysql
# Fix Nginx
_force_nginx_restart=no
if [ -r /etc/nginx/sites-enabled/default ]; then
rm -f /etc/nginx/sites-enabled/default
_force_nginx_restart=yes
fi
if ps x | grep nginx | grep -vq grep; then
if [ $_force_nginx_restart = yes ]; then
service nginx restart
fi
else
service nginx start
fi
if [ ! -h /etc/rc3.d/*redmine-fcgi ]; then
update-rc.d redmine-fcgi defaults
fi
# Install the Redmine instance
# rm -f /etc/lighttpd/lighttpd.conf
# ln -s cgit.lighttpd.conf /etc/lighttpd/lighttpd.conf
# service lighttpd restart
# (re)Start the service through /etc/init.d/redmine-fcgi
if service redmine-fcgi status >/dev/null; then
service redmine-fcgi restart || nef_fatal "could not restart redmine-fcgi"
else
service redmine-fcgi start || nef_fatal "could not start redmine-fcgi"
fi