summarylogtreecommitdiffstats
path: root/oscam.install
diff options
context:
space:
mode:
authorJulian Xhokaxhiu2015-10-03 11:39:43 +0200
committerJulian Xhokaxhiu2015-10-03 11:39:43 +0200
commitd1169603ad2768619404e617ad8b3707daa6c222 (patch)
tree6915c857e9068bd5641b2fdff1c78c3476ab9288 /oscam.install
downloadaur-d1169603ad2768619404e617ad8b3707daa6c222.tar.gz
First commit.
Diffstat (limited to 'oscam.install')
-rw-r--r--oscam.install31
1 files changed, 31 insertions, 0 deletions
diff --git a/oscam.install b/oscam.install
new file mode 100644
index 000000000000..30cc782e0889
--- /dev/null
+++ b/oscam.install
@@ -0,0 +1,31 @@
+post_install() {
+ systemd-sysusers
+
+ if [ ! -f /var/lib/oscam/oscam.conf ]; then
+ mkdir -p /var/lib/oscam
+ cat <<'EOF' > /var/lib/oscam/oscam.conf
+[global]
+logfile = syslog
+
+[webif]
+httpport = 8080
+httpuser = myusername
+httppwd = mypassword
+httpallowed = 0.0.0.0-255.255.255.255
+EOF
+ chown -R oscam:oscam /var/lib/oscam
+ echo "Default username: myusername"
+ echo "Default password: mypassword"
+ echo "Default webinterface port: 8080"
+ echo "WARNING! Webinterface is accessible for all IPs by default. Change that!"
+ fi
+}
+
+post_upgrade() {
+ systemd-sysusers
+
+ if [ ! -f /var/lib/oscam/oscam.conf ]; then
+ mv /var/lib/oscam/oscam.conf.pacsave \
+ /var/lib/oscam/oscam.conf 2> /dev/null
+ fi
+} \ No newline at end of file