rtigd2 8 Posted January 26, 2019 Share Posted January 26, 2019 (edited) Following on from someone asking about it last year, I modify my debian systemctl script to allow for 'graceful' server stops. At the same time, I prefer to use a different user to 'emby' for many reasons (mostly a carry over from what I was using before) so I've written a script that downloads the latest (always on beta) and then opens up the systemctl script so I can make my changes, then does all the daemon reload etc etc etc. My question is, are we going to see this kind of thing implemented in the future? /etc/systemd/system/multi-user.target.wants/emby-server.service [Unit] Description=Emby Server is a personal media server with apps on just about every device. After=network.target [Service] EnvironmentFile=/etc/emby-server.conf WorkingDirectory=/opt/emby-server ExecStart=/opt/emby-server/bin/emby-server ExecStop=/opt/emby-server/bin/emby-stop RestartForceExitStatus=3 User=<my user> [Install] WantedBy=multi-user.target /opt/emby-server/bin/emby-stop #!/bin/sh APIKEY=<the key> METHOD=http HOST=localhost PORT=8096 curl -X POST "$METHOD://$HOST:$PORT/emby/System/Shutdown?api_key=$APIKEY" --head -H 'Content-Length: 1' Or, at least, have the packager not over-write (by default) the systemctl config, perhaps add a .packagenew version (or similar)? Edited January 26, 2019 by rtigd2 Link to comment Share on other sites More sharing options...
Solution Luke 37026 Posted January 26, 2019 Solution Share Posted January 26, 2019 It's possible for the future, thanks. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now