-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.rc
More file actions
33 lines (28 loc) · 873 Bytes
/
setup.rc
File metadata and controls
33 lines (28 loc) · 873 Bytes
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
# Installer script for sysconf layer sysconf.backuppc -*- shell-script -*-
# Install required Debian packages
_packages=
_packages="$_packages nginx fcgiwrap backuppc par bzip2"
sysconf_require_packages $_packages
if dpkg -l | grep -q apache2; then
service apache2 stop
apt-get purge --yes apache2 apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common
fi
if [ ! -d /etc/backuppc/.git ]; then
git init /etc/backuppc
cd /etc/backuppc
git add -A
git commit -m "automatic initial commit from BackupPC distrib conf"
fi
# 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