forked from duncanthrax/scream
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add scripts to configure additional user scream for systemd service
- Loading branch information
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
|
||
useradd \ | ||
--no-user-group \ | ||
--create-home \ | ||
--home-dir /var/lib/scream \ | ||
--shell /usr/sbin/nologin \ | ||
--groups audio \ | ||
--system \ | ||
scream | ||
|
||
# Enable and start the service | ||
systemctl disable scream.service | ||
|
||
# Explicitly exit 0 | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
|
||
# Disable and stop the service | ||
systemctl disable --now scream.service | ||
|
||
# Remove the user | ||
userdel scream | ||
|
||
# Clean up the data directory (don't worry about program files, 'dpkg' handles that!) | ||
rm -rf /var/lib/scream | ||
|
||
# Explicitly exit 0 | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters