Skip to content

Commit 63e8a6c

Browse files
authored
moving variables & syntax
1 parent 5a0d711 commit 63e8a6c

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

apache2-deployer.sh

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@ homedir="/home"
1010
# The name of you website's folder (usually public_html or www)
1111
webdir="public_html"
1212

13-
# ADVANCED
14-
# Change only if you know what you're doing
15-
# Default umask to replace from your user's .profile file
16-
defumask="#umask 022"
17-
# Desired umask (007 is equivalent to chmod 770)
18-
umask="umask 007"
19-
2013
#############
2114
## Program ##
2215
#############
@@ -25,6 +18,8 @@ umask="umask 007"
2518
selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
2619
apache_sites="/etc/apache2/sites-available"
2720
apacheprocess="www-data"
21+
defumask="#umask 022"
22+
umask="umask 007"
2823

2924
# Check that the user inputted two arguments
3025
if [ -z "$1" ] || [ -z "$2" ]; then
@@ -147,7 +142,7 @@ fn_fix_umask(){
147142
sleep 2
148143
echo "Fixing user umask (default permissions on files)"
149144
sleep 1
150-
sed -i 's/"${defumask}"/${umask}/g' ${userdir}/.profile
145+
sed -i "s/${defumask}/${umask}/g" "${userdir}"/.profile
151146
echo "[OK] ${umask} set!"
152147
}
153148

0 commit comments

Comments
 (0)