M6: serve and export modes, packaging
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
45105d292f
commit
00ee2a6d12
29 files changed
+1294
-75
No files matched your search
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
if ! getent group luphoto >/dev/null; then
|
||||
groupadd --system luphoto
|
||||
fi
|
||||
if ! getent passwd luphoto >/dev/null; then
|
||||
useradd --system --gid luphoto --home-dir /var/lib/luphoto --no-create-home --shell /usr/sbin/nologin --comment "LuPhoto" luphoto
|
||||
fi
|
||||
if ! getent group luphoto-upload >/dev/null; then
|
||||
groupadd --system luphoto-upload
|
||||
fi
|
||||
usermod -a -G luphoto-upload luphoto
|
||||
|
||||
if [ ! -d /srv/luphoto/albums ]; then
|
||||
install -d -m 0755 -o root -g root /srv/luphoto
|
||||
install -d -m 2775 -o root -g luphoto-upload /srv/luphoto/albums
|
||||
fi
|
||||
install -d -m 0755 -o luphoto -g luphoto /var/lib/luphoto /var/cache/luphoto
|
||||
|
||||
if [ -d /run/systemd/system ]; then
|
||||
systemctl daemon-reload >/dev/null 2>&1 || true
|
||||
if systemctl is-active --quiet luphoto.service; then
|
||||
systemctl try-restart luphoto.service >/dev/null 2>&1 || true
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
Reference in new issue
Block a user