Only chown the things that need it

This commit is contained in:
Bob Mottram 2016-07-31 09:08:27 +01:00
parent 0142ddf9c8
commit 650fb34181
1 changed files with 7 additions and 9 deletions

View File

@ -185,7 +185,7 @@ function configure_zeronet_blog {
if [ ! -d /home/${MY_USERNAME}/.config/zeronet ]; then
mkdir -p /home/${MY_USERNAME}/.config/zeronet
chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config
chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config/zeronet
fi
echo "$ZERONET_URL/$ZERONET_BLOG_ADDRESS" > /home/${MY_USERNAME}/.config/zeronet/myblog
@ -263,7 +263,7 @@ function configure_zeronet_mail {
if [ ! -d /home/${MY_USERNAME}/.config/zeronet ]; then
mkdir -p /home/${MY_USERNAME}/.config/zeronet
chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config
chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config/zeronet
fi
echo "$ZERONET_URL/$ZERONET_MAIL_ADDRESS" > /home/${MY_USERNAME}/.config/zeronet/mymail
@ -336,7 +336,7 @@ function configure_zeronet_forum {
if [ ! -d /home/${MY_USERNAME}/.config/zeronet ]; then
mkdir -p /home/${MY_USERNAME}/.config/zeronet
chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config
chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config/zeronet
fi
echo "$ZERONET_URL/$ZERONET_FORUM_ADDRESS" > /home/${MY_USERNAME}/.config/zeronet/myforum
@ -405,7 +405,7 @@ function configure_zeronet_id {
if [ ! -d /home/${MY_USERNAME}/.config/zeronet ]; then
mkdir -p /home/${MY_USERNAME}/.config/zeronet
chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config
chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config/zeronet
fi
echo "$ZERONET_URL/$ZERONET_ID_ADDRESS" > /home/${MY_USERNAME}/.config/zeronet/myzeroid
@ -464,7 +464,7 @@ function configure_toxcore {
function create_tox_user {
if [ ! -f /home/${MY_USERNAME}/.config/tox/data.tox ]; then
toxid -u $MY_USERNAME -n data
chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config
chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config/tox
fi
if [ ! -d /home/$MY_USERNAME/Desktop ]; then
@ -508,9 +508,7 @@ function show_desktop_icons {
echo 'Categories=Application;' >> /home/$MY_USERNAME/Desktop/new_identity.desktop
# set permissions
chmod +x /home/${MY_USERNAME}/Desktop/*
chown ${MY_USERNAME}:${MY_USERNAME} /home/$MY_USERNAME/Desktop/*
chown ${MY_USERNAME}:${MY_USERNAME} /home/$MY_USERNAME/.config
chown -R ${MY_USERNAME}:${MY_USERNAME} /home/$MY_USERNAME/.config/tox
chown -R ${MY_USERNAME}:${MY_USERNAME} /home/$MY_USERNAME/.config/zeronet
chown -R ${MY_USERNAME}:${MY_USERNAME} /home/$MY_USERNAME/.config/autostart
@ -684,7 +682,7 @@ function setup_amnesic_data {
rm -rf /home/${MY_USERNAME}/.config/${tomb_name}
fi
ln -s /media/${tomb_name} /home/${MY_USERNAME}/.config/${tomb_name}
chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config
chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config/${tomb_name}
chown -R ${MY_USERNAME}:${MY_USERNAME} /media/${tomb_name}
echo "${tomb_name} tomb created" >> $INSTALL_LOG
else
@ -701,7 +699,7 @@ function setup_amnesic_data {
rm -rf /home/${MY_USERNAME}/.config/zeronet
fi
ln -s /media/${tomb_name} /home/${MY_USERNAME}/.config/zeronet
chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config
chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config/zeronet
chown -R ${MY_USERNAME}:${MY_USERNAME} /media/${tomb_name}
echo "${tomb_name} tomb created" >> $INSTALL_LOG
else