summaryrefslogtreecommitdiff
path: root/jamulus-headless/jamulus.install
diff options
context:
space:
mode:
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 "$@"