summaryrefslogtreecommitdiff
path: root/jamulus-headless/jamulus.install
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-02-05 22:53:50 +0100
committerErich Eckner <git@eckner.net>2021-02-05 22:53:50 +0100
commit524ef2b6d9e5922a54de8257d232cadc319ca04c (patch)
tree6e26111d695a01e1bb27a246bdeedfa3f12d13ae /jamulus-headless/jamulus.install
parent539e73506eba647c100b70e4aa44eca562de12b8 (diff)
downloadarchlinuxewe-524ef2b6d9e5922a54de8257d232cadc319ca04c.tar.xz
jamulus-headless new
Diffstat (limited to 'jamulus-headless/jamulus.install')
-rw-r--r--jamulus-headless/jamulus.install35
1 files changed, 35 insertions, 0 deletions
diff --git a/jamulus-headless/jamulus.install b/jamulus-headless/jamulus.install
new file mode 100644
index 000000000..1faa132ea
--- /dev/null
+++ b/jamulus-headless/jamulus.install
@@ -0,0 +1,35 @@
+post_install() {
+ getent passwd jamulus &>/dev/null || {
+ echo "Creating jamulus user.."
+ useradd --system --no-create-home -g nobody -s /bin/false jamulus &>/dev/null
+ }
+ cat <<HERE
+Configure server variables:
+ sudo systemctl edit jamulus.service
+ paste the following text and adjust according to your needs
+
+# central_server => https://github.com/corrados/jamulus/wiki/Central-Servers
+# country ID => https://doc.qt.io/qt-5/qlocale.html#Country-enum
+[Service]
+Environment=central_server="name_of_the_server"
+Environment=server_info="yourServerName;yourCity;[country ID]"
+
+ systemctl daemon-reload
+
+To start the service:
+ sudo systemctl start jamulus
+
+To enable the service at boot:
+ sudo systemctl enable jamulus
+
+HERE
+}
+
+post_remove() {
+ echo "Consider removing jamulus user from the system"
+}
+
+op=$1
+shift
+
+$op "$@"