Fix some issues in the installer

This commit is contained in:
2022-01-05 21:58:47 +01:00
parent 19b8e136dc
commit 99509dc5a4

View File

@@ -20,16 +20,17 @@ mkconfig(){
mkuser(){ mkuser(){
# Create user account, distro mess awaits here... # Create user account, distro mess awaits here...
# Debian has both useradd and adduser # Debian has both useradd and adduser
if [ -e /sbin/useradd ] if [ -e /usr/sbin/useradd ]
then then
useradd -r telelog useradd -r telelog
return 0 return 0
fi fi
# Alpine only has adduser (Busybox) # Alpine only has adduser (Busybox)
if [ -e /sbin/adduser ] if [ -e /usr/sbin/adduser ]
then then
adduser -S telelog adduser -S telelog
addgroup -S telelog addgroup -S telelog
addgroup telelog telelog
return 0 return 0
fi fi
} }
@@ -37,6 +38,7 @@ mkuser(){
addfiles(){ addfiles(){
# Install executable and config # Install executable and config
install -dm770 -o root -g telelog /var/telelog install -dm770 -o root -g telelog /var/telelog
install -dm770 -o root -g telelog /var/telelog/logs
install -m640 -o root -g telelog config.py /var/telelog/config.py install -m640 -o root -g telelog config.py /var/telelog/config.py
install -m755 -o root -g root bin/telelog /usr/bin/telelog install -m755 -o root -g root bin/telelog /usr/bin/telelog