Adding self installation command for fabrica
This commit is contained in:
29
.packer/provisioning/alpine/cleanup.sh
Normal file
29
.packer/provisioning/alpine/cleanup.sh
Normal file
@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -xe
|
||||
|
||||
source /root/provisioning/common.sh
|
||||
|
||||
removePkg()
|
||||
{
|
||||
apk del --no-cache $1
|
||||
return $?
|
||||
}
|
||||
|
||||
cleanProv()
|
||||
{
|
||||
rm -rf /root/provisioning
|
||||
return $?
|
||||
}
|
||||
|
||||
for pkg in ${PKG_TO_REMOVE}
|
||||
do
|
||||
removePkg ${pkg}
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "Warning : removing package ${pkg} failed with code $?"
|
||||
fi
|
||||
done
|
||||
|
||||
cleanProv
|
||||
exit $?
|
Reference in New Issue
Block a user