That's working:
echo guest | sudo -S activate example.xzm
But I need:
"If not yet activated, then activate"
How can this be done?
Use of activate in the script
- Ed_P
- Contributor
- Posts: 8370
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Use of activate in the script
Something like this should work.
Where PSWD, CHROME and OPTIONAL are set before the if statement.
Code: Select all
if [ ! -e /mnt/live/memory/images/$CHROME ]; then
echo $PSWD | sudo -S activate $OPTIONAL/$CHROME > /dev/null 2>&1 &
sleep 2
fi
Ed
Use of activate in the script
[[ -d /mnt/live/memory/images/example.xzm ]] || activate example.xzm