User:Razzi/How to run systemd unit of another user
Appearance
btullis@stat1008:~$ id uid=32741(btullis) gid=500(wikidev) groups=500(wikidev),4(adm),107(render),700(ops),731(analytics-privatedata-users) btullis@stat1008:~$ export XDG_RUNTIME_DIR="/run/user/32741" btullis@stat1008:~$ export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus" btullis@stat1008:~$ systemctl --user status ● stat1008 State: running Jobs: 0 queued Failed: 0 units Since: Sun 2021-11-07 14:02:35 UTC; 3 months 2 days ago CGroup: /user.slice/user-32741.slice/user@32741.service ├─opensearch.service │ └─10267 /home/btullis/src/datahub/opensearch/jdk/bin/java -Xshare:auto -Dopensearch.networkaddress.cache.ttl=60 -Dopensearch.netwo ├─kafka-broker.service │ └─21536 /usr/lib/jvm/java-11-openjdk-amd64/bin/java -Xmx1G -Xms1G -server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapO ├─schema-registry.service │ └─23197 /usr/lib/jvm/java-11-openjdk-amd64/bin/java -Xmx512M -server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupa ├─datahub-mae-consumer-job.service │ └─10198 /usr/bin/java -jar ./mae-consumer-job.jar ├─init.scope │ ├─2620 /lib/systemd/systemd --user │ └─2623 (sd-pam) ├─datahub-frontend.service │ └─5388 java -Xms512m -Xmx1024m -Dhttp.port=9002 -Dconfig.file=/home/btullis/src/datahub/datahub/docker/datahub-frontend/datahub-fr ├─datahub-mce-consumer-job.service │ └─14146 /usr/bin/java -jar ./mce-consumer-job.jar ├─datahub-gms.service │ └─3609 /usr/bin/java -Xms1g -Xmx1g -jar jetty-runner.jar --jar jetty-util.jar --jar jetty-jmx.jar ./war.war ├─neo4j.service │ └─27760 /usr/lib/jvm/java-11-openjdk-amd64/bin/java -cp /home/btullis/src/datahub/neo4j/plugins:/home/btullis/src/datahub/neo4j/co └─zookeeper.service └─20265 /usr/lib/jvm/java-11-openjdk-amd64/bin/java -Xmx512M -Xms512M -server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingH btullis@stat1008:~$ systemctl --user stop schema-registry.service