Creating user before media directory.

This commit is contained in:
Roland 2022-01-16 09:22:03 -07:00
parent ca96bce6b7
commit ba59a2c75e
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93

View file

@ -92,14 +92,14 @@ cp /opt/wrolpi/nginx.conf /etc/nginx/nginx.conf
cp /opt/wrolpi/50x.html /var/www/50x.html
/usr/sbin/nginx -s reload
# Create the media directory. This should be mounted by the maintainer.
[ -d /media/wrolpi ] || mkdir /media/wrolpi
chown -R wrolpi:wrolpi /media/wrolpi
# Create the WROLPi user
grep wrolpi /etc/passwd || useradd -d /opt/wrolpi wrolpi -s "$(command -v bash)"
chown -R wrolpi:wrolpi /opt/wrolpi
# Create the media directory. This should be mounted by the maintainer.
[ -d /media/wrolpi ] || mkdir /media/wrolpi
chown -R wrolpi:wrolpi /media/wrolpi
# Install the systemd services
cp /opt/wrolpi/systemd/wrolpi-api.service /etc/systemd/system/
cp /opt/wrolpi/systemd/wrolpi-app.service /etc/systemd/system/