debmaker/ressources/paperless-ngx/rootfs/DEBIAN/postinst

16 lines
416 B
Text
Raw Normal View History

2024-05-15 10:20:52 +02:00
#!/bin/bash
APP=paperless-ngx
HOMEDIR=/var/lib/paperless-ngx
LOGDIR=/var/log/paperless-ngx
CACHEDIR=/var/cache/paperless-ngx
[ -d ${HOMEDIR} ] || mkdir -p ${HOMEDIR}
id ${APP} &> /dev/null || useradd ${APP} -r -s /bin/false -d ${HOMEDIR}
chown ${APP}:${APP} ${HOMEDIR}
[ -d ${LOGDIR} ] || mkdir -p ${LOGDIR}
chown ${APP}:${APP} ${LOGDIR}
[ -d ${CACHEDIR} ] || mkdir -p ${CACHEDIR}
chown ${APP}:${APP} ${CACHEDIR}