Changes

From Amahi Wiki
Jump to: navigation, search
===Scripted Functions===
* [[Script_variables|Script Variables]]: environment variables built into the Amahi 7 or greater platform
 
* Check if file exists:
<nowiki>[[ -f /etc/passwd ]]</nowiki> && echo "File exist" || echo "File does not exist"
 
* Check if directory exists:
[ -d /var/log ] && echo "Directory exist" || echo "Directory does not exist"
 
* Compare files:
<nowiki>[[ /etc/resolv.conf -ef /etc/resolv.conf ]]</nowiki> && echo "Same files" || echo "Different Files"
<nowiki>[[ /etc/resolv.conf -ef /etc/passwd ]]</nowiki> && echo "Same files" || echo "Different Files"
 
* Source file unarchives into ''unpack'' folder:
# Check for unpack folder
* Check if Share exists
if [ -d /var/hda/files/syncthing/.stfolder ]; then
echo share directory exists...files preserved!
else
echo share directory created
fi * Network Interface Name:
HDA_DEVICE=`nmcli d | grep 'ethernet' | awk '{print $1;}'`;
or
12,424

edits