summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJannis M. Hoffmann <jannis@fehcom.de>2023-09-26 22:37:54 +0200
committerJannis M. Hoffmann <jannis@fehcom.de>2023-09-26 22:37:54 +0200
commit8012e435a90675ca0efb2475e079a1320eecd6b2 (patch)
tree2c9d58cfbd6417bbec79249d02ccea78c35dc765
parentb1aba43d6ccab69a1e8402e86f1fde06d664da3f (diff)
add jwebmail user on install
-rw-r--r--MANIFEST4
-rwxr-xr-xconfigure1
-rw-r--r--confninja.sh5
-rw-r--r--install/jwebmail-sysusers.conf1
-rw-r--r--install/jwebmail.service (renamed from jwebmail.service)6
-rw-r--r--package.json5
6 files changed, 11 insertions, 11 deletions
diff --git a/MANIFEST b/MANIFEST
index 646796d..51e723e 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -55,6 +55,9 @@ templates/webmail/writemail.html.ep
templates/exception_.html.ep
templates/not_found.html.ep
+install/jwebmail.service
+install/jwebmail-sysusers.conf
+
.editorconfig
actions
CHANGES.md
@@ -62,7 +65,6 @@ configure
confninja.sh
jwebmail.development.toml
jwebmail.production.toml
-jwebmail.service
LICENSE
Makefile.PL
MANIFEST
diff --git a/configure b/configure
index 52c52af..193e999 100755
--- a/configure
+++ b/configure
@@ -78,6 +78,7 @@ END
esac
done
shift $((OPTIND-1))
+[ $# -gt 0 ] && { echo 'unknown arguments' >&2; exit 2; }
: "${JWM_MAILDIR_EXTRACTOR=extractpy}" && echo "$JWM_MAILDIR_EXTRACTOR" | grep -Eq '^extract(pl|py|rs)$'
: "${JWM_MODE=development}" && [ "$JWM_MODE" = development -o "$JWM_MODE" = production ]
diff --git a/confninja.sh b/confninja.sh
index eb68ea1..e5fb52e 100644
--- a/confninja.sh
+++ b/confninja.sh
@@ -236,10 +236,11 @@ done
if [ "$JWM_INIT" = systemd ]
then
case "$PREFIX" in
- (usr) install_file instdata etc/systemd/system . jwebmail.service;;
- (usr/local) install_file instdata usr/local/lib/systemd/system . jwebmail.service;;
+ (usr) install_file instdata etc/systemd/system install jwebmail.service;;
+ (usr/local) install_file instdata usr/local/lib/systemd/system install jwebmail.service;;
(*) echo 'unknown prefix' >&2; exit 1;;
esac
+ install_file instdata etc/sysusers.d install jwebmail-sysusers.conf
fi
echo "build install: phony $ALL_INST"
diff --git a/install/jwebmail-sysusers.conf b/install/jwebmail-sysusers.conf
new file mode 100644
index 0000000..3f3ca59
--- /dev/null
+++ b/install/jwebmail-sysusers.conf
@@ -0,0 +1 @@
+u jwebmail - "JWebmail user"
diff --git a/jwebmail.service b/install/jwebmail.service
index 44169db..a49e07f 100644
--- a/jwebmail.service
+++ b/install/jwebmail.service
@@ -4,11 +4,11 @@ After=network.target
[Service]
Type=exec
-ExecStart=/usr/bin/hypnotoad -f jwebmail
-ExecReload=/usr/bin/hypnotoad -f jwebmail
+ExecStart=hypnotoad -f jwebmail
+ExecReload=hypnotoad -f jwebmail
PIDFile=/run/jwebmail/hypnotoad.pid
Environment=MOJO_LOG_SHORT=1
-DynamicUser=yes
+User=jwebmail
[Install]
WantedBy=multi-user.target
diff --git a/package.json b/package.json
index 961a8f7..8134fc3 100644
--- a/package.json
+++ b/package.json
@@ -5,11 +5,6 @@
"directories": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
- "build": "npm run build-js && npm run build-css && npm run build-sass",
- "build-js": "esbuild --bundle src/login_cram.js src/displayheaders.js src/rendermail.js --outdir=public/src/",
- "build-css": "esbuild --bundle css/my_pure.css --outdir=public/css/",
- "build-sass": "sass --update --load-path=node_modules/ scss/my_bulma.scss public/css/my_bulma.css",
- "build-release": "esbuild --bundle --minify css/*.css src/*.js --outdir=public/ && sass --update --no-source-maps --style=compress --load-path=node_modules/ scss/my_bulma.scss public/css/my_bulma.css",
"watch-sass": "sass --watch --load-path=node_modules/ scss/my_bulma.scss public/css/my_bulma.css",
"watch-esbuild": "esbuild --watch --bundle --sourcemap css/*.css src/*.js --outdir=public/"
},