mirror of
https://github.com/RasppleII/a2server.git
synced 2024-11-01 05:05:26 +00:00
Merge branch 'master' of https://github.com/rasppleii/a2server
This commit is contained in:
commit
eb6c0ede94
86
scripts/a2server-aliases.txt
Executable file
86
scripts/a2server-aliases.txt
Executable file
@ -0,0 +1,86 @@
|
|||||||
|
# A2SERVER aliases:
|
||||||
|
|
||||||
|
|
||||||
|
alias a2server-help="more /usr/local/etc/a2server-help.txt"
|
||||||
|
alias a2server-setup="wget -q -O /tmp/a2server-setup appleii.ivanx.com/a2server/setup/; source /tmp/a2server-setup"
|
||||||
|
|
||||||
|
alias a2server-version="cat /usr/local/etc/A2SERVER-version"
|
||||||
|
alias a2server-update="wget -q -O /tmp/a2server-update appleii.ivanx.com/a2server/update/; 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 ivanx.com/a2server/files/raspbian-update.txt; source /tmp/raspbian-update'
|
||||||
|
alias rasppleii-update='raspbian-update a2cloud a2server'
|
||||||
|
|
||||||
|
alias welcome-message-edit='[[ $(lsb_release -d 2> /dev/null | grep Ubuntu) ]] && motd=/etc/issue || motd=/etc/motd; sudo nano $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"
|
||||||
|
alias netatalk-restart="sudo /etc/init.d/netatalk restart; bonjour-on"
|
||||||
|
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 /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="/media/A2SHARED/A2FILES"
|
||||||
|
GSFILES="/media/A2SHARED/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='[[ $(lsb_release -d 2> /dev/null | grep Ubuntu) ]] && { sudo initctl stop smbd; sudo initctl stop nmbd; [[ -f /etc/init/smbd.conf ]] && sudo mv /etc/init/smbd.conf /etc/init/smbd.conf.off; [[ -f /etc/init/nmbd.conf ]] && sudo mv /etc/init/nmbd.conf /etc/init/nmbd.conf.off; } || { sudo /etc/init.d/samba stop; sudo update-rc.d -f samba remove &> /dev/null; }'
|
||||||
|
alias samba-on='[[ $(lsb_release -d 2> /dev/null | grep Ubuntu) ]] && { [[ -f /etc/init/smbd.conf.off ]] && sudo mv /etc/init/smbd.conf.off /etc/init/smbd.conf; [[ -f /etc/init/nmbd.conf.off ]] && sudo mv /etc/init/nmbd.conf.off /etc/init/nmbd.conf; sudo initctl start smbd; sudo initctl start nmbd; } || { sudo update-rc.d samba defaults &> /dev/null; sudo /etc/init.d/samba restart; }'
|
||||||
|
alias samba-stop='[[ $(lsb_release -d 2> /dev/null | grep Ubuntu) ]] && { sudo initctl stop smbd; sudo initctl stop nmbd; } || { sudo /etc/init.d/samba stop; }'
|
||||||
|
alias samba-start='[[ $(lsb_release -d 2> /dev/null | grep Ubuntu) ]] && { sudo initctl start smbd; sudo initctl start nmbd; } || { sudo /etc/init.d/samba start; }'
|
||||||
|
alias samba-restart='[[ $(lsb_release -d 2> /dev/null | grep Ubuntu) ]] && { sudo initctl restart smbd; sudo initctl restart nmbd; } || { sudo /etc/init.d/samba restart; }'
|
||||||
|
|
||||||
|
alias gsfiles-share="sudo sed -i 's/^\/media\/A2SHARED\/GSFILES\ GSFILES options:prodos/#share1/' /usr/local/etc/netatalk/AppleVolumes.default"
|
||||||
|
alias gsfiles-unshare="sudo sed -i 's/^#share1/\/media\/A2SHARED\/GSFILES\ GSFILES options:prodos/' /usr/local/etc/netatalk/AppleVolumes.default; [[ -d /media/A2SHARED/GSFILES ]] || mkdir /media/A2SHARED/GSFILES"
|
||||||
|
alias a2files-share="sudo sed -i 's/^\/media\/A2SHARED\/A2FILES\ A2FILES options:prodos\ casefold:toupper/#share2/' /usr/local/etc/netatalk/AppleVolumes.default"
|
||||||
|
alias a2files-unshare="sudo sed -i 's/^#share2/\/media\/A2SHARED\/A2FILES\ A2FILES options:prodos\ casefold:toupper/' /usr/local/etc/netatalk/AppleVolumes.default; [[ -d /media/A2SHARED/A2FILES ]] || mkdir /media/A2SHARED/A2FILES"
|
||||||
|
|
||||||
|
alias showalias="alias | cut -d= -f 1 | cut -d' ' -f2 | more"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
86
scripts/a2server-help.txt
Executable file
86
scripts/a2server-help.txt
Executable file
@ -0,0 +1,86 @@
|
|||||||
|
A2SERVER commands:
|
||||||
|
(note: new commands may be added; use a2server-setup to refresh)
|
||||||
|
|
||||||
|
a2server-help: show this list of commands
|
||||||
|
a2server-setup: set up network boot, Windows access, Farallon fix,
|
||||||
|
refresh command list
|
||||||
|
a2server-version: see installed version of A2SERVER
|
||||||
|
a2server-update: check for update to A2SERVER
|
||||||
|
|
||||||
|
system-shutdown: shut down the server
|
||||||
|
system-restart: shut down and restart the server
|
||||||
|
|
||||||
|
Raspberry Pi commands, if you're using one:
|
||||||
|
raspi-config: utilize all space on RPi SD card & other options
|
||||||
|
raspbian-update : update Raspbian operating system
|
||||||
|
rasppleii-update : update Raspbian OS, A2CLOUD, A2SERVER, Apple II Pi
|
||||||
|
|
||||||
|
welcome-message-edit: change the welcome message
|
||||||
|
|
||||||
|
showip: show the current ethernet IP address of the server
|
||||||
|
showmac: show the MAC (Ethernet hardware) address of the server
|
||||||
|
showip-wifi: show the current wifi IP address of the server
|
||||||
|
showmac-wifi: show the MAC (wifi hardware) address of the server
|
||||||
|
ifreset: reset all network interfaces (requires restart)
|
||||||
|
|
||||||
|
netatalk-stop: stop the netatalk service until reboot
|
||||||
|
netatalk-start: start the netatalk service
|
||||||
|
netatalk-restart: restart the netatalk service
|
||||||
|
netatalk-off: disable the netatalk service (even after reboot)
|
||||||
|
netatalk-on: enable the netatalk service
|
||||||
|
|
||||||
|
bonjour-off: disable advertisement of shared folders to OS X
|
||||||
|
bonjour-on : enable advertisement of shared folders to OS X
|
||||||
|
(these are automatically set by the netatalk commands above)
|
||||||
|
|
||||||
|
netatalk-router-on: use netatalk in router mode (default)
|
||||||
|
netatalk-router-off: use netatalk in node mode
|
||||||
|
(use if there is an AppleTalk router such as a GatorBox present)
|
||||||
|
|
||||||
|
netatalk-eth: use wired ethernet interface for netatalk (default)
|
||||||
|
netatalk-wifi: use wifi interface for netatalk
|
||||||
|
note: if an interface isn't available, netatalk will be reset with
|
||||||
|
router mode off; use "netatalk-router-on" to correct this if needed
|
||||||
|
|
||||||
|
appletalk-off: disable AppleTalk networking (even after reboot)
|
||||||
|
appletalk-on : enable AppleTalk networking
|
||||||
|
|
||||||
|
environment variables:
|
||||||
|
$NETATALK: directory containing netatalk configuration files
|
||||||
|
$A2FILES : directory containing A2FILES shared volume
|
||||||
|
$GSFILES : directory containing GSFILES shared volume
|
||||||
|
|
||||||
|
netboot-gsos: set the current user to netboot into GS/OS (default)
|
||||||
|
netboot-gsos-guest: set guests to netboot into GS/OS
|
||||||
|
netboot-p8: set the current user to netboot into ProDOS 8
|
||||||
|
netboot-p8-guest: set guests to netboot into ProDOS 8 (default)
|
||||||
|
note: when a IIgs is set to network boot into GS/OS, using the Network
|
||||||
|
control panel or the NETBOOT.GSOS utility, guests will behave like
|
||||||
|
registered users, and ignore the netboot setting of the guest user
|
||||||
|
|
||||||
|
guest-off: disallow guest access to A2SERVER
|
||||||
|
guest-on: allow guest access to A2SERVER (default)
|
||||||
|
note: by default, Guest access is the only way to network boot into
|
||||||
|
ProDOS 8. For registered user boot into ProDOS 8, type "netboot-p8"
|
||||||
|
|
||||||
|
samba-off: disable Windows file sharing (even after reboot)
|
||||||
|
samba-on: enable Windows file Sharing
|
||||||
|
samba-stop: stop Windows file sharing until reboot
|
||||||
|
samba-start: start Windows file sharing
|
||||||
|
samba-restart: stop and restart Windows file sharing
|
||||||
|
|
||||||
|
gsfiles-share: disable the GSFILES shared volume
|
||||||
|
gsfiles-unshare: enable the GSFILES shared volume
|
||||||
|
a2files-share: disable the A2FILES shared volume
|
||||||
|
a2files-unshare: enable the A2FILES shared volume
|
||||||
|
|
||||||
|
nulib2: create, extract, and work with NuFX (ShrinkIt) archive files
|
||||||
|
unar: extract other archive files (multiformat)
|
||||||
|
lsar: list contents of other archive files (multiformat)
|
||||||
|
|
||||||
|
afptype: set the ProDOS type/auxtype or Mac OS type/creator of a file
|
||||||
|
afpsync: register files introduced outside of AFP with netatalk
|
||||||
|
mkatinit: set up network boot configuration files
|
||||||
|
cppo: catalog and copy files from ProDOS image file (slow, but works)
|
||||||
|
(add -h to show help for the above four commands, e.g. "afptype -h")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user