Still working on the launchd/ssytemd situation
This commit is contained in:
parent
0b74f45372
commit
e77881c293
4
setup.py
4
setup.py
@ -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
|
||||
)
|
||||
|
5
setup.sh
5
setup.sh
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user