Checks when adding users
This commit is contained in:
parent
c9e1bf34e3
commit
5bd77daaf8
|
@ -384,6 +384,12 @@ function install_gogs {
|
|||
fi
|
||||
|
||||
adduser --disabled-login --gecos 'Gogs' $GOGS_USERNAME
|
||||
|
||||
if [ ! -d /home/$GOGS_USERNAME ]; then
|
||||
echo $"/home/$GOGS_USERNAME directory not created"
|
||||
exit 783528
|
||||
fi
|
||||
|
||||
groupadd gogs
|
||||
|
||||
gogs_parameters
|
||||
|
|
|
@ -450,6 +450,10 @@ function install_ipfs_go {
|
|||
if [ ! -d /home/git ]; then
|
||||
# add a gogs user account
|
||||
adduser --disabled-login --gecos 'Gogs' git
|
||||
if [ ! -d /home/git ]; then
|
||||
echo $"/home/git directory not created"
|
||||
exit 735272
|
||||
fi
|
||||
|
||||
# install Go
|
||||
if ! grep -q "export GOPATH=" ~/.bashrc; then
|
||||
|
|
|
@ -616,6 +616,10 @@ function install_irc_bouncer {
|
|||
apt-get -yq install znc
|
||||
|
||||
adduser --disabled-login --gecos 'znc' znc
|
||||
if [ ! -d /home/znc ]; then
|
||||
echo $"/home/znc directory not created"
|
||||
exit 7354262
|
||||
fi
|
||||
|
||||
mkdir -p /home/znc/.znc/configs
|
||||
mkdir -p /home/znc/.znc/users
|
||||
|
|
|
@ -351,6 +351,11 @@ function remove_pihole {
|
|||
function install_pihole {
|
||||
apt-get -yq install dnsmasq curl
|
||||
adduser --disabled-login --gecos 'pi-hole' pihole
|
||||
if [ ! -d /home/pihole ]; then
|
||||
echo $"/home/pihole directory not created"
|
||||
exit 538929
|
||||
fi
|
||||
|
||||
chmod 600 /etc/shadow
|
||||
chmod 600 /etc/gshadow
|
||||
usermod -a -G www-data pihole
|
||||
|
|
|
@ -563,6 +563,11 @@ __ENDCONFIG__
|
|||
fi
|
||||
|
||||
adduser --disabled-login --home=$TURTL_BASE_DIR --gecos 'turtl' turtl
|
||||
if [ ! -d /home/turtl ]; then
|
||||
echo $"/home/turtl directory not created"
|
||||
exit 263493
|
||||
fi
|
||||
|
||||
groupadd turtl
|
||||
chown -R turtl:turtl $TURTL_BASE_DIR
|
||||
|
||||
|
|
Loading…
Reference in New Issue