Create and remove search engine users
This commit is contained in:
parent
e87d8cc04b
commit
45e48526dc
|
@ -9364,7 +9364,7 @@ function install_search_engine {
|
||||||
SEARCH_ENGINE_PASSWORD="$(openssl rand -base64 16)"
|
SEARCH_ENGINE_PASSWORD="$(openssl rand -base64 16)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo "$SEARCH_ENGINE_PASSWORD" | htpasswd -i -d -c /etc/nginx/.htpasswd $MY_USERNAME
|
echo "$SEARCH_ENGINE_PASSWORD" | htpasswd -i -s -c /etc/nginx/.htpasswd $MY_USERNAME
|
||||||
echo '' >> /home/$MY_USERNAME/README
|
echo '' >> /home/$MY_USERNAME/README
|
||||||
echo '' >> /home/$MY_USERNAME/README
|
echo '' >> /home/$MY_USERNAME/README
|
||||||
echo $'Search Engine' >> /home/$MY_USERNAME/README
|
echo $'Search Engine' >> /home/$MY_USERNAME/README
|
||||||
|
|
|
@ -365,6 +365,12 @@ if grep -q "install_irc_client" $COMPLETION_FILE; then
|
||||||
chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.irssi
|
chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.irssi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f /etc/nginx/.htpasswd ]; then
|
||||||
|
if ! grep "${MY_USERNAME}:" /etc/nginx/.htpasswd; then
|
||||||
|
echo "$NEW_USER_PASSWORD" | htpasswd -i -s /etc/nginx/.htpasswd $MY_USERNAME
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# add user menu on ssh login
|
# add user menu on ssh login
|
||||||
if ! grep -q 'control' /home/$MY_USERNAME/.bashrc; then
|
if ! grep -q 'control' /home/$MY_USERNAME/.bashrc; then
|
||||||
echo 'control' >> /home/$MY_USERNAME/.bashrc
|
echo 'control' >> /home/$MY_USERNAME/.bashrc
|
||||||
|
|
|
@ -104,6 +104,12 @@ if grep -q "GNU Social domain" $COMPLETION_FILE; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f /etc/nginx/.htpasswd ]; then
|
||||||
|
if grep "${MY_USERNAME}:" /etc/nginx/.htpasswd; then
|
||||||
|
htpasswd -D /etc/nginx/.htpasswd $MY_USERNAME
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
#if grep -q "install_owncloud" $COMPLETION_FILE; then
|
#if grep -q "install_owncloud" $COMPLETION_FILE; then
|
||||||
# occ user:delete $MY_USERNAME
|
# occ user:delete $MY_USERNAME
|
||||||
#fi
|
#fi
|
||||||
|
|
Loading…
Reference in New Issue