Skip to content

Commit a78eb65

Browse files
authored
Don't enable apparmour profile is abi4.0 is not available (hestiacp#4795)
1 parent 364e4dc commit a78eb65

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

bin/v-add-sys-ssh-jail

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,13 @@ check_hestia_demo_mode
3737
# Move jailbash to /usr/sbin
3838
if [ ! -x /usr/sbin/jailbash ]; then
3939
cp -f $HESTIA_COMMON_DIR/bubblewrap/jailbash /usr/sbin/jailbash
40-
cp -f $HESTIA_COMMON_DIR/bubblewrap/bwrap-userns-restrict /etc/apparmor.d/bwrap-userns-restrict
4140
chmod +x /usr/sbin/jailbash
4241

42+
# only install the apparmor profile is abi 4.0 is available
43+
if [ -f /etc/apparmor.d/abi/4.0 ]; then
44+
cp -f $HESTIA_COMMON_DIR/bubblewrap/bwrap-userns-restrict /etc/apparmor.d/bwrap-userns-restrict
45+
fi
46+
4347
service apparmor reload > /dev/null 2>&1
4448
fi
4549

install/upgrade/versions/1.9.3.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
# Hestia Control Panel upgrade script for target version 1.9.3
4+
5+
#######################################################################################
6+
####### Place additional commands below. #######
7+
#######################################################################################
8+
####### upgrade_config_set_value only accepts true or false. #######
9+
####### #######
10+
####### Pass through information to the end user in case of a issue or problem #######
11+
####### #######
12+
####### Use add_upgrade_message "My message here" to include a message #######
13+
####### in the upgrade notification email. Example: #######
14+
####### #######
15+
####### add_upgrade_message "My message here" #######
16+
####### #######
17+
####### You can use \n within the string to create new lines. #######
18+
#######################################################################################
19+
20+
upgrade_config_set_value 'UPGRADE_UPDATE_WEB_TEMPLATES' 'false'
21+
upgrade_config_set_value 'UPGRADE_UPDATE_DNS_TEMPLATES' 'false'
22+
upgrade_config_set_value 'UPGRADE_UPDATE_MAIL_TEMPLATES' 'false'
23+
upgrade_config_set_value 'UPGRADE_REBUILD_USERS' 'no'
24+
upgrade_config_set_value 'UPGRADE_UPDATE_FILEMANAGER_CONFIG' 'false'
25+
26+
# Remove jailbash app armour file if abi 4.0 is no installed
27+
if [ ! -f /etc/apparmor.d/abi/4.0 ]; then
28+
rm -f /etc/apparmor.d/bwrap-userns-restrict
29+
fi

0 commit comments

Comments
 (0)