summarylogtreecommitdiffstats
path: root/bareos-storage.install
blob: be7444f2eb5717e208239ae7de5e0a4d77cf8fc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
yellow='\e[0;33m'
coloroff='\e[0m'

post_install() {
   /usr/lib/bareos/scripts/bareos-config initialize_local_hostname
   /usr/lib/bareos/scripts/bareos-config initialize_passwords

   chown -R bareos:bareos /usr/share/bareos/config/bareos-sd.d
   chown bareos:bareos /usr/bin/bareos-sd

   chown bareos:bareos /var/lib/bareos/storage/
   chmod 750 /var/lib/bareos/storage/

   /usr/lib/bareos/scripts/bareos-config setup_sd_user
}

post_upgrade() {
   post_install
   echo -e "${yellow}NOTE: Renamed bareos-sd.service to bareos-storage.service${coloroff}"
}