File tree Expand file tree Collapse file tree 3 files changed +19
-6
lines changed
Expand file tree Collapse file tree 3 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 931931
932932# Restrict access to /proc fs
933933# - Prevent unpriv users from seeing each other running processes
934- mount -o remount,defaults,hidepid=2 /proc
935- echo " @reboot root sleep 5 && mount -o remount,defaults,hidepid=2 /proc" > /etc/cron.d/hestia-proc
934+ mount -o remount,defaults,hidepid=2 /proc > /dev/null 2>&1
935+ if [ $? -ne 0 ]; then
936+ echo " Info: Cannot remount /proc (LXC containers require additional perm added to host apparmor profile)"
937+ else
938+ echo " @reboot root sleep 5 && mount -o remount,defaults,hidepid=2 /proc" > /etc/cron.d/hestia-proc
939+ fi
940+
936941
937942# ----------------------------------------------------------#
938943# Configure Hestia #
Original file line number Diff line number Diff line change 988988
989989# Restrict access to /proc fs
990990# - Prevent unpriv users from seeing each other running processes
991- mount -o remount,defaults,hidepid=2 /proc
992- echo " @reboot root sleep 5 && mount -o remount,defaults,hidepid=2 /proc" > /etc/cron.d/hestia-proc
991+ mount -o remount,defaults,hidepid=2 /proc > /dev/null 2>&1
992+ if [ $? -ne 0 ]; then
993+ echo " Info: Cannot remount /proc (LXC containers require additional perm added to host apparmor profile)"
994+ else
995+ echo " @reboot root sleep 5 && mount -o remount,defaults,hidepid=2 /proc" > /etc/cron.d/hestia-proc
996+ fi
993997
994998
995999# ----------------------------------------------------------#
Original file line number Diff line number Diff line change 6565# Restrict access to /proc fs
6666if [ ! -e " /etc/cron.d/hestia-proc" ]; then
6767 echo " [ * ] Restrict access to /proc fs"
68- echo " @reboot root sleep 5 && mount -o remount,defaults,hidepid=2 /proc" > /etc/cron.d/hestia-proc
69- mount -o remount,defaults,hidepid=2 /proc
68+ mount -o remount,defaults,hidepid=2 /proc > /dev/null 2>&1
69+ if [ $? -ne 0 ]; then
70+ echo " Info: Cannot remount /proc (LXC containers require additional perm added to host apparmor profile)"
71+ else
72+ echo " @reboot root sleep 5 && mount -o remount,defaults,hidepid=2 /proc" > /etc/cron.d/hestia-proc
73+ fi
7074fi
You can’t perform that action at this time.
0 commit comments