--- /dev/null
+#! /bin/sh
+
+read date
+read time
+
+logger -t musiikki "DateTime: $date $time"
+date -s "$date $time"
+
--- /dev/null
+#! /bin/sh
+
+/sbin/halt -p
--- /dev/null
+#! /bin/bash
+
+#
+# Run via cron every 5 minutes
+#
+
+cfg=/etc/musiikki.conf
+
+if [ ! -f ${cfg} ]
+then
+ echo "Cannot find config file ${cfg}" > /dev/stderr
+ exit 2
+fi
+
+. $cfg
+
+#
+# Unfortunately minidlnad is not able to rescan the archive during
+# regular operation. Depending on the size of the archive rescanning
+# can last for one hour or more, and only few files will be announced
+# during this operation.
+#
+
+if [ -f "${rescan_file}" ]
+then
+ rm "${rescan_file}"
+ rm -f ${cache}
+ /usr/sbin/service minidlna restart
+fi
--- /dev/null
+#! /bin/sh
+
+read ro_passwd
+read rw_passwd
+
+logger -t musiikki "Samba: newpasswd"
+
+if [ -n "${ro_passwd}" ]
+then
+ (
+ echo "${ro_passwd}"
+ echo "${ro_passwd}"
+ ) | /usr/bin/smbpasswd -s "musicread" > /dev/null 2>&1
+fi
+
+if [ -n "${rw_passwd}" ]
+then
+ (
+ echo "${rw_passwd}"
+ echo "${rw_passwd}"
+ ) | /usr/bin/smbpasswd -s "musicwrite" > /dev/null 2>&1
+
+fi
--- /dev/null
+#! /bin/sh
+
+read essid
+read password
+
+logger -t musiikki "WiFi: ESSID $essid"
+
+sed -i "s/ssid=.*/ssid=${essid}/;s/wpa_passphrase=.*/wpa_passphrase=${password}/" /etc/hostapd/hostapd.conf
+
+cd /tmp/
+nohup /etc/init.d/hostapd restart > /dev/null 2>&1 &