Include eclass for new nodejs ebuilds

New packages (zigbee2mqtt and node-red) from my gentoo overlay (https://github.com/inode64/inode64-overlay)
This commit is contained in:
INODE64
2023-02-20 19:06:55 +01:00
parent 5a35539f54
commit ddb5532108
15 changed files with 767 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/sbin/openrc-run
depend() {
after mosquitto
}
start() {
ebegin "Starting ${SVCNAME}"
start-stop-daemon --start --user node-red:node-red --chdir /usr/lib64/node_modules/node-red/packages/node_modules/node-red/ --exec /usr/bin/npm --background --make-pidfile --pidfile /run/${SVCNAME}.pid -- start
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --quiet --retry 10 --pidfile /run/${SVCNAME}.pid
eend $?
}
+1
View File
@@ -0,0 +1 @@
d /var/lib/node-red 0750 node-red node-red
+42
View File
@@ -0,0 +1,42 @@
[Unit]
Description=node-red
After=network.target
After=mosquitto.service
[Service]
ExecStart=npm start
WorkingDirectory=/usr/lib64/node_modules/node-red/packages/node_modules/node-red/
StandardOutput=inherit
StandardError=inherit
Restart=always
User=node-red
CapabilityBoundingSet=
NoNewPrivileges=true
RemoveIPC=true
LockPersonality=true
ProtectControlGroups=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectHostname=true
ProtectProc=noaccess
ProtectClock=yes
DeviceAllow=char-* rw
RestrictRealtime=true
RestrictSUIDSGID=true
RestrictNamespaces=true
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
ProtectSystem=strict
ProtectHome=true
PrivateTmp=true
ReadWritePaths=/var/lib/node-red
SystemCallArchitectures=native
SystemCallFilter=@system-service @pkey
[Install]
WantedBy=multi-user.target