21 lines
432 B
Text
21 lines
432 B
Text
|
#!/bin/sh
|
||
|
# It's very important to set user/group correctly.
|
||
|
|
||
|
wikijs_dir='/var/lib/wikijs'
|
||
|
|
||
|
if ! getent group wikijs 1>/dev/null; then
|
||
|
echo '* Creating group wikijs' 1>&2
|
||
|
|
||
|
addgroup -S wikijs -g 5494
|
||
|
fi
|
||
|
|
||
|
if ! id wikijs 2>/dev/null 1>&2; then
|
||
|
echo '* Creating user wikijs' 1>&2
|
||
|
|
||
|
adduser -DHS -G wikijs -h "$wikijs_dir" -u 5494 -s /bin/sh \
|
||
|
-g "added by apk for wikijs" wikijs
|
||
|
passwd -u wikijs 1>/dev/null # unlock
|
||
|
fi
|
||
|
|
||
|
exit 0
|