mirror of
https://github.com/nextcloud/vm.git
synced 2025-10-26 11:27:32 +00:00
Sudo user (#111)
* minor bug fixes * revert to sudo user and not logname
This commit is contained in:
parent
1c46747ede
commit
006fc3c8e4
@ -17,7 +17,7 @@ PHPMYADMIN_CONF="/etc/apache2/conf-available/phpmyadmin.conf"
|
||||
GITHUB_REPO="https://raw.githubusercontent.com/nextcloud/vm/master"
|
||||
STATIC="https://raw.githubusercontent.com/nextcloud/vm/master/static"
|
||||
LETS_ENC="https://raw.githubusercontent.com/nextcloud/vm/master/lets-encrypt"
|
||||
UNIXUSER=$LOGNAME
|
||||
UNIXUSER=$SUDO_USER
|
||||
NCPASS=nextcloud
|
||||
NCUSER=ncadmin
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ IFACE=$(lshw -c network | grep "logical name" | awk '{print $3; exit}')
|
||||
ADDRESS=$(hostname -I | cut -d ' ' -f 1)
|
||||
|
||||
# Linux user, and Nextcloud user
|
||||
UNIXUSER=$LOGNAME
|
||||
UNIXUSER=$SUDO_USER
|
||||
NCPASS=nextcloud
|
||||
NCUSER=ncadmin
|
||||
|
||||
@ -61,6 +61,19 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Show current user
|
||||
echo
|
||||
echo "Current user with sudo permissions is: $UNIXUSER".
|
||||
echo "This script will set everything up with that user."
|
||||
echo "If the field after ":" is blank you are probably running as a pure root user."
|
||||
echo "It's possible to install with root, but there will be minor errors."
|
||||
|
||||
echo "Please create a user with sudo permissions if you want an optimal installation."
|
||||
echo "This script continues in 20 seconds, press CTRL+C to abort..."
|
||||
sleep 20
|
||||
echo
|
||||
|
||||
|
||||
# Prefer IPv4
|
||||
sed -i "s|#precedence ::ffff:0:0/96 100|precedence ::ffff:0:0/96 100|g" /etc/gai.conf
|
||||
|
||||
@ -128,13 +141,6 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Show current user
|
||||
echo
|
||||
echo "Current user with sudo permissions is: $UNIXUSER".
|
||||
echo "This script will set everything up with that user, FYI."
|
||||
sleep 3
|
||||
echo
|
||||
|
||||
# Create $SCRIPTS dir
|
||||
if [ -d $SCRIPTS ]
|
||||
then
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
UNIXUSER=$LOGNAME
|
||||
UNIXUSER=$SUDO_USER
|
||||
UNIXUSER_PROFILE="~/.bash_profile"
|
||||
|
||||
rm ~/.profile
|
||||
|
||||
Loading…
Reference in New Issue
Block a user