Actually in classic Doom there are two gun activated line actions that can do that:
46: GR Door open stay
47: G1 Floor Raise to next floor, change texture (trigger method), type -> 0
Because each line can have only one action you'll need to have two action lines layered: One action to the eye-swith line and an other action to a line just in front of it. Make sure there's practicly no chance that you could hit only one of them without activating the other.
If you're mapping in Doom/Hexen or UDMF you could still use the same method and set the actions to activate on projectile impact:
11: Door Open
228: Platform Raise Tx0
However ACS is much more reliable then. And you can still use the very same actions:
Door_Open (tag, speed, 0);
Plat_RaiseAndStayTx0 (tag, speed, 1);
If ACS is all new to you, take a look at:
https://zdoom.org/zdkb/scriptprimer.html
https://zdoom.org/zdkb/scrmikewelsh.html (otherways great but those "const:" things are unnecessary)
https://zdoom.org/wiki/ACS