"source" and run python functions in bash
Example: TODO
pip install pysource
The following should probably be placed in .bashrc
or something similar.
The functions pysource
and def
are sourced in this shell script.
source $(which pysource.sh)
To start/stop/restart/status the daemon
pysource daemon [start, stop, restart, status]
If the daemon was not stopped in a clean manner start
will do its best, but this might still
be shaky. So you are advised to also remove all the files in ~/.pysource
manually check that
there isn't any pysource daemon process lurking somewhere and try again.
This logic should probably be managed by systemd
or something similar, but this is what I have for now.
TODO
Copyright 2014 Dan Kilman
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.