Skarafaz / mercury

Simple Android app that sends pre-configured commands to remote servers via SSH.
GNU General Public License v2.0
115 stars 20 forks source link

Feature Request: Remote Pull of Config #18

Closed gregod closed 10 months ago

gregod commented 7 years ago

While the current config method is mainly designed for dependency free one-off comands, my workflows more often than not require droping small scripts on the ssh hosts which get executed by mercury. This leaves the configuration in two places: on the device for the mercury config and on the ssh host for the actual scripts / behaviour. Having to use adb to update the mercury config feels a litle tedious compared to having some kind of sync / pull behaviour.

Following the exising simple configuration philosophy I propose a new setting key "origin" on the json server property pointing to a file path. When the user invokes the sync/update action and the the key is present for a config file, its origin location on the remote server is checked for any changes and the config is updated in place.

Skarafaz commented 7 years ago

A google drive sync feature is planned. I'll consider to implement your idea too.

dreua commented 6 years ago

I would prefer @gregod's proposal over a Google Drive sync, because I don't use Google Drive. (If you also add Seafile, Nextcloud and Dropbox-Sync that would be fine, but I this is far too much work.)

Another option (or good addition to @gregod's proposal) would be an intent-filter displaying Mercury if someone want's to share a *.json file from anywhere in Android (could be Drive, Nextcloud or a chat).

We could even consider an URL-handler for ssh://host/path/to/config.json (Github-Style ;)) to get the initial configuration via ssh (assuming public keys are set up) - that would be super awesome imo!

dreua commented 6 years ago

I just realized that a file chooser intent would be more intuitive.

Skarafaz commented 6 years ago

Drive sync is almost ready (I think Drive on Android is a quite obvious choice).

@dreua your ideas are very interesting...!! I think I will work on it.