Skip to content

Commit

Permalink
Add .tmp to fix_dot_dirs()
Browse files Browse the repository at this point in the history
  • Loading branch information
omega8cc committed Mar 30, 2015
1 parent e3bd027 commit 694d218
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
13 changes: 12 additions & 1 deletion aegir/tools/system/manage_ltd_users.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ enable_chattr() {
fi
mkdir -p ${_U_HD}/usr
mkdir -p ${_U_TP}
touch ${_U_TP}
find ${_U_TP}/ -mtime +0 -exec rm -rf {} \; &> /dev/null
chown $1:${usrGroup} ${_U_TP}
chown $1:${usrGroup} ${_U_HD}
Expand Down Expand Up @@ -415,6 +416,12 @@ done
#
# Fix dot dirs.
fix_dot_dirs() {
usrTmp="/home/${usrLtd}/.tmp"
if [ ! -d "${usrTmp}" ]; then
mkdir -p ${usrTmp}
chown ${usrLtd}:${usrGroup} ${usrTmp}
chmod 02755 ${usrTmp}
fi
usrDrush="/home/${usrLtd}/.drush"
if [ ! -d "${usrDrush}" ]; then
mkdir -p ${usrDrush}
Expand Down Expand Up @@ -582,7 +589,9 @@ add_user_if_not_exists() {
echo "We will update user == ${usrLtd} =="
disable_chattr ${usrLtd}
rm -f -r /home/${usrLtd}/drush-backups
find /home/${usrLtd}/.tmp/* -mtime +0 -exec rm -rf {} \; &> /dev/null
mkdir -p /home/${usrLtd}/.tmp
touch /home/${usrLtd}/.tmp
find /home/${usrLtd}/.tmp/ -mtime +0 -exec rm -rf {} \; &> /dev/null
ok_update_user
enable_chattr ${usrLtd}
fi
Expand Down Expand Up @@ -647,6 +656,7 @@ update_php_cli_local_ini() {
|| [ ! -d "${_U_TP}" ] \
|| [ ! -e "${_U_HD}/.ctrl.241stableU.txt" ]; then
mkdir -p ${_U_TP}
touch ${_U_TP}
find ${_U_TP}/ -mtime +0 -exec rm -rf {} \; &> /dev/null
mkdir -p ${_U_HD}
chown ${_USER}:${usrGroup} ${_U_TP}
Expand Down Expand Up @@ -1392,6 +1402,7 @@ for pthParentUsr in `find /data/disk/ -maxdepth 1 -mindepth 1 | sort`; do
if [ ! -e "${dscUsr}/.tmp/.ctrl.241stableU.txt" ]; then
rm -f -r ${dscUsr}/.drush/cache
mkdir -p ${dscUsr}/.tmp
touch ${dscUsr}/.tmp
find ${dscUsr}/.tmp/ -mtime +0 -exec rm -rf {} \; &> /dev/null
chown ${_USER}:${usrGroup} ${dscUsr}/.tmp &> /dev/null
chmod 02755 ${dscUsr}/.tmp &> /dev/null
Expand Down
1 change: 1 addition & 0 deletions lib/functions/master.sh.inc
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,7 @@ update_php_cli_local_ini() {
|| [ ! -d "${_U_TP}" ] \
|| [ ! -e "${_U_HD}/.ctrl.241stableU.txt" ]; then
mkdir -p ${_U_TP}
touch ${_U_TP}
find ${_U_TP}/ -mtime +0 -exec rm -rf {} \; &> /dev/null
chmod 02755 ${_U_TP}
mkdir -p ${_U_HD}
Expand Down
2 changes: 2 additions & 0 deletions lib/functions/satellite.sh.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,7 @@ satellite_child_b_update_ini_php_cli() {
|| [ ! -d "${_U_TP}" ] \
|| [ ! -e "${_U_HD}/.ctrl.241stableU.txt" ]; then
mkdir -p ${_U_TP}
touch ${_U_TP}
find ${_U_TP}/ -mtime +0 -exec rm -rf {} \; &> /dev/null
chmod 02755 ${_U_TP}
mkdir -p ${_U_HD}/{sys,xts,usr}
Expand Down Expand Up @@ -2397,6 +2398,7 @@ satellite_if_add_update_user_dot_dirs() {
_USER_TMP="${_USER_HD}/.tmp"
if [ ! -d "${_USER_TMP}" ]; then
mkdir -p ${_USER_TMP}
touch ${_USER_TMP}
find ${_USER_TMP}/ -mtime +0 -exec rm -rf {} \; &> /dev/null
chown -R ${_USERFTP}:${_USRG} ${_USER_TMP}
chmod 755 ${_USER_TMP}
Expand Down

0 comments on commit 694d218

Please sign in to comment.