a2server/scripts/tools/a2server-aliases.txt
Ivan X 14f5ef66be alternate URL for precompiled binaries with A2SERVER_BINARY_URL
self-hosted external dependency fallback; or default via A2SERVER_NO_EXTERNAL=1
a2serverrc sets default A2SERVER_SCRIPT_URL and A2SERVER_BINARY_URL
64-bit Debian precompiled binary support
support for reorganized files subdirectory
better information re unsupported OS at start of install
info about netboot at end of install
no longer deletes ~/GNUstep
install libdb5.1 and libssl1.0.0 by default instead of older versions
small tweaks and fixes regarding Debian detection, case insensitive fs, etc
updated source code path for The Unarchiver
this is internal version 1.2.8; see "release" notes about external dependencies
2015-12-24 13:02:17 +09:00

85 lines
4.7 KiB
Bash
Executable File

#! /bin/bash
# vim: set tabstop=4 shiftwidth=4 expandtab filetype=sh:
alias a2server-help="more /usr/local/etc/a2server-help.txt"
alias a2server-setup="wget -q -O /tmp/a2server-setup ${A2SERVER_SCRIPT_URL}setup/index.txt || { echo \"Can't download A2SERVER setup scripts. Do you has internet?\"; false; } && source /tmp/a2server-setup"
alias a2server-version="cat /usr/local/etc/A2SERVER-version"
alias a2server-update="wget -q -O /tmp/a2server-update ${A2SERVER_SCRIPT_URL}update/index.txt || { echo \"Can't download A2SERVER setup scripts. Do you has internet?\"; false; } && source /tmp/a2server-update"
alias system-shutdown='sudo shutdown -h now'
alias system-restart='sudo shutdown -r now'
alias raspi-config='[[ -f /usr/bin/raspi-config ]] && sudo /usr/bin/raspi-config || echo "raspi-config not found. Are you using a Raspberry Pi with Raspbian?"'
alias raspbian-update='wget -qO /tmp/raspbian-update ${A2SERVER_SCRIPT_URL}scripts/raspbian-update.txt; source /tmp/raspbian-update'
alias rasppleii-update='raspbian-update a2cloud a2server'
alias welcome-message-edit='sudo nano /etc/motd'
alias showip='ifconfig eth0 | grep "inet\ addr" | cut -d: -f2 | cut -d" " -f1'
alias showmac='ifconfig eth0 | grep "HWaddr" | cut -dH -f2 | cut -c7-23'
alias showip-wifi='ifconfig wlan0 | grep "inet\ addr" | cut -d: -f2 | cut -d" " -f1'
alias showmac-wifi='ifconfig wlan0 | grep "HWaddr" | cut -dH -f2 | cut -c7-23'
alias ifreset='sudo rm /etc/udev/rules.d/70-persistent-net.rules; echo Interfaces removed. You should system-restart now.'
alias netatalk-stop="sudo /etc/init.d/netatalk stop; bonjour-off"
alias netatalk-start="sudo /etc/init.d/netatalk start; bonjour-on; grep -q 'ATALKD_RUN=yes' /etc/default/netatalk"
alias netatalk-restart="sudo /etc/init.d/netatalk restart; bonjour-on; grep -q 'ATALKD_RUN=yes' /etc/default/netatalk"
alias netatalk-off='sudo /etc/init.d/netatalk stop; bonjour-off; sudo update-rc.d -f netatalk remove &> /dev/null'
alias netatalk-on='sudo update-rc.d netatalk defaults &> /dev/null; bonjour-on; sudo /etc/init.d/netatalk restart'
alias bonjour-off="sudo mv /etc/avahi/services/afpd.service /etc/avahi/services/afpd.service_disabled &> /dev/null"
alias bonjour-on="sudo mv /etc/avahi/services/afpd.service_disabled /etc/avahi/services/afpd.service &> /dev/null"
alias netatalk-router-on='sudo sed -i '"'"'s/^eth0.*$/eth0 -router -phase 2 -net 1 -zone "A2SERVER"/'"'"' /usr/local/etc/netatalk/atalkd.conf; sudo sed -i '"'"'s/^wlan0.*$/wlan0 -router -phase 2 -net 1 -zone "A2SERVER"/'"'"' /usr/local/etc/netatalk/atalkd.conf; netatalk-restart'
alias netatalk-router-off='sudo sed -i '"'"'s/^eth0.*$/eth0/'"'"' /usr/local/etc/netatalk/atalkd.conf; sudo sed -i '"'"'s/^wlan0.*$/wlan0/'"'"' /usr/local/etc/netatalk/atalkd.conf; netatalk-restart'
alias netatalk-eth='sudo sed -i 's/^wlan0/eth0/' /usr/local/etc/netatalk/atalkd.conf; netatalk-restart'
alias netatalk-wifi='sudo sed -i 's/^eth0/wlan0/' /usr/local/etc/netatalk/atalkd.conf; netatalk-restart'
alias appletalk-off='sudo sed -i "s/ATALKD_RUN=yes/ATALKD_RUN=no/" /etc/default/netatalk; sudo killall macipgw > /dev/null; /etc/init.d/netatalk restart'
alias appletalk-on='sudo sed -i "s/ATALKD_RUN=no/ATALKD_RUN=yes/" /etc/default/netatalk; sudo /etc/init.d/netatalk restart'
NETATALK="/usr/local/etc/netatalk"
A2FILES="/srv/A2SERVER/A2FILES"
GSFILES="/srv/A2SERVER/GSFILES"
alias netboot-gsos="mkatinit -gs -d -f"
alias netboot-gsos-guest="mkatinit -gs -d -f guest"
alias netboot-p8="mkatinit -d -f"
alias netboot-p8-guest="mkatinit -d -f guest"
alias guest-off="sudo sed -i 's/uams_guest.so,//' /usr/local/etc/netatalk/afpd.conf; [[ -f /etc/samba/smb.conf ]] && sudo sed -i 's/^ guest ok = yes/ guest ok = no/' /etc/samba/smb.conf; sudo /etc/init.d/netatalk restart"
alias guest-on="sudo sed -i 's/-uamlist uams_clrtxt.so/-uamlist uams_guest.so,uams_clrtxt.so/' /usr/local/etc/netatalk/afpd.conf; [[ -f /etc/samba/smb.conf ]] && sudo sed -i 's/^ guest ok = no/ guest ok = yes/' /etc/samba/smb.conf; sudo /etc/init.d/netatalk restart"
alias samba-off='sudo /etc/init.d/samba stop; sudo update-rc.d -f samba remove &> /dev/null'
alias samba-on='sudo update-rc.d samba defaults &> /dev/null; sudo /etc/init.d/samba restart'
alias samba-stop='sudo /etc/init.d/samba stop'
alias samba-start='sudo /etc/init.d/samba start'
alias samba-restart='sudo /etc/init.d/samba restart'
alias a2files-share="sudo sed -i 's/^#share2/\/srv\/A2SERVER\/A2FILES\ A2FILES options:prodos ea:ad/' /usr/local/etc/netatalk/AppleVolumes.default; [[ -d /srv/A2SERVER/A2FILES ]] || mkdir /srv/A2SERVER/A2FILES"
alias a2files-unshare="sudo sed -i 's/^\/srv\/A2SERVER\/A2FILES.*$/#share2/' /usr/local/etc/netatalk/AppleVolumes.default"
alias showalias="alias | cut -d= -f 1 | cut -d' ' -f2 | more"
#