Skip to content
wilkersoncs edited this page Oct 30, 2014 · 2 revisions

Here is the script that automates creating vTimeCapsule as described in the vTimeCapsule Wiki.

#!/bin/sh

Shell script to change TurnKey Linux Core into Apple Time Capsule

install-security-updates apt-get -y install netatalk libc6-dev avahi-daemon libnss-mdns

[ -f /etc/nsswitch.conf.orig ] || cp /etc/nsswitch.conf /etc/nsswitch.conf.orig cat /etc/nsswitch.conf.orig | sed -e "s/mdns4$/mdns4 mdns/" > /etc/nsswitch.conf

[ -f /etc/avahi/services/afpd.service ] && cp /etc/avahi/services/afpd.service /etc/avahi/services/afpd.service.orig cat > /etc/avahi/services/afpd.service << EOF

%h _afpovertcp._tcp548 _device-info._tcp0model=TimeCapsule

EOF

Insert TimeCapsule share

[ -f /etc/netatalk/AppleVolumes.default.orig ] || cp /etc/netatalk/AppleVolumes.default /etc/netatalk/AppleVolumes.default.orig cat /etc/netatalk/AppleVolumes.default.orig | sed -e "s/# End/\/TimeCapsule "Time Capsule"\n# End/" | sed -e "s/options:upriv,usedots/cnidscheme:dbd options:upriv,usedots,tm/" > /etc/netatalk/AppleVolumes.default mkdir /TimeCapsule chmod 777 /TimeCapsule

if [ ! -f /etc/default/netatalk.orig ]; then cp /etc/default/netatalk /etc/default/netatalk.orig cat >> /etc/default/netatalk << EOF ATALKD_RUN=no PAPD_RUN=no CNID_METAD_RUN=yes AFPD_RUN=yes TIMELORD_RUN=no A2BOOT_RUN=no EOF fi # End of netatalk update

Clone this wiki locally