Remove all stopped containers.
docker rm $(docker ps -a -q)
Remove all untagged images
docker rm $(docker ps -a -q)
### BEGIN INIT INFO
# Provides: cloudprint
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: System service to run cloud print connector
# Description: System service to run cloud print connector
### END INIT INFO
# Carry out start/stop/restart actions
case "$1" in
start)
echo "Starting cloud print connector"
sudo -u pi cloudprint >> /var/log/cloudprint.log &
;;
stop)
echo "Stopping cloud print connector"
killall cloudprint
;;
restart)
echo "Restart connector"
echo "Stopping cloud print connector"
killall cloudprint
echo "Starting cloud print connector"
sudo -u pi cloudprint >> /var/log/cloudprint.log &
;;
*)
echo "Usage: /etc/init.d/gcloudprint {start|stop|restart}"
exit 1
;;
esac
exit 0