Still working on the launchd/ssytemd situation

This commit is contained in:
Daniel Dayley 2021-07-20 15:01:40 -06:00
parent 0b74f45372
commit e77881c293
2 changed files with 5 additions and 4 deletions

View File

@ -57,6 +57,6 @@ setup(name='python-tool',
install_requires=['pyyaml',],
scripts=['bin/python-tool'],
long_description=open('README.md').read(),
zip_safe=True,
cmdclass={'install':CustomInstallCommand,'develop':CustomDevelopCommand,'egg_info':CustomEggInfoCommand,'build_ext':CustomBuildExtCommand}
cmdclass={'install':CustomInstallCommand,'develop':CustomDevelopCommand,'egg_info':CustomEggInfoCommand,'build_ext':CustomBuildExtCommand},
zip_safe=True
)

View File

@ -30,8 +30,9 @@ setup_install() {
if [[ "$OS" == "macOS" && $(ps -p 1 | grep launchd) == *"launchd" ]]; then
echo "Installing launchd job..."
SERVICE_FILE='com.cronocide.python-tool.plist'
SERVICE_DIR="~/Library/LaunchAgents/"
cp -r "$SERVICE_FILE" "$SERVICE_DIR"/
SERVICE_DIR="/Library/LaunchAgents/"
sudo cp -r "$SERVICE_FILE" "$SERVICE_DIR"/
sudo chmod 644 "$SERVICE_DIR"/"$SERVICE_FILE"
sudo launchctl load "$SERVICE_FILE"
echo "Installed launchd job."
fi