update APC manager script with upstream version