- add new asterisk user to legacy group
- chown everything asterisk:www-data instead of asterisk:asterisk - part of #1526 git-svn-id: http://wush.net/svn/range/software/commercial/asterisk/trunk@7650 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
parent
4b02131daa
commit
d3432b4f79
|
@ -24,7 +24,7 @@ case "$1" in
|
|||
fi
|
||||
|
||||
# add asterisk to required groups
|
||||
for group in dialout audio; do
|
||||
for group in dialout audio www-data; do
|
||||
if groups asterisk | grep -w -q -v $group; then
|
||||
adduser asterisk $group
|
||||
fi
|
||||
|
@ -37,7 +37,7 @@ case "$1" in
|
|||
/var/lib/asterisk \
|
||||
-type d | while read dir; do
|
||||
if ! dpkg-statoverride --list "$dir" > /dev/null ; then
|
||||
chown asterisk: "$dir"
|
||||
chown asterisk:www-data "$dir"
|
||||
fi
|
||||
done
|
||||
|
||||
|
@ -47,13 +47,13 @@ case "$1" in
|
|||
# we are doing the same for subdirectories, since we are not shipping
|
||||
# any and it's supposed to be user-modifiable
|
||||
if ! dpkg-statoverride --list "/etc/asterisk" > /dev/null ; then
|
||||
chown asterisk: /etc/asterisk
|
||||
chown asterisk:www-data /etc/asterisk
|
||||
fi
|
||||
|
||||
# spool holds some sensitive information (e.g. monitor, voicemail etc.)
|
||||
find /var/spool/asterisk -type d | while read dir; do
|
||||
if ! dpkg-statoverride --list "$dir" > /dev/null ; then
|
||||
chown asterisk: "$dir"
|
||||
chown asterisk:www-data "$dir"
|
||||
chmod 750 "$dir"
|
||||
fi
|
||||
done
|
||||
|
@ -80,7 +80,7 @@ case "$1" in
|
|||
dpkg-query -W -f='${Conffiles}\n' $ASTERISK_CONFIG 2>/dev/null | \
|
||||
sed -nr -e 's; (/etc/asterisk/.*) [0-9a-f]*;\1;p' | \
|
||||
while read conffile; do
|
||||
chown asterisk: "$conffile" 2>/dev/null
|
||||
chown asterisk:www-data "$conffile" 2>/dev/null
|
||||
done
|
||||
|
||||
# handle them in the end with a glob since it's way faster
|
||||
|
|
Loading…
Reference in New Issue