Fix some issues in the installer
This commit is contained in:
parent
19b8e136dc
commit
99509dc5a4
6
install
6
install
@ -20,16 +20,17 @@ mkconfig(){
|
||||
mkuser(){
|
||||
# Create user account, distro mess awaits here...
|
||||
# Debian has both useradd and adduser
|
||||
if [ -e /sbin/useradd ]
|
||||
if [ -e /usr/sbin/useradd ]
|
||||
then
|
||||
useradd -r telelog
|
||||
return 0
|
||||
fi
|
||||
# Alpine only has adduser (Busybox)
|
||||
if [ -e /sbin/adduser ]
|
||||
if [ -e /usr/sbin/adduser ]
|
||||
then
|
||||
adduser -S telelog
|
||||
addgroup -S telelog
|
||||
addgroup telelog telelog
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
@ -37,6 +38,7 @@ mkuser(){
|
||||
addfiles(){
|
||||
# Install executable and config
|
||||
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 -m755 -o root -g root bin/telelog /usr/bin/telelog
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user